Mysql Insert Query|Insert records in mysql

Syntax:
Here is generic SQL syntax of INSERT INTO command to insert data into MySQL table:
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)
Create syntax:
CREATE TABLE Country(Code int PRIMARY key,Name varchar(100))
Insert Format 1:
insert into Country(code,Name)
values(1,'India');
Insert Format 2:
insert into Country
SELECT '2','China';

Post a Comment

0 Comments