SQL Single Insert

Insert Into Value is used to insert record into table.

There are two types of Single Insert

  • With Column name
  • Without Column name


With Column Name


Syntax


INSERT INTO table_name(column1, column2, column3, column4, . . . . ... . . . ., columnN) VALUES(value1, value2, value3, value4, . . . . . . . . . . valueN); 



Example


INSERT INTO Student(`RollNo`, `Name`, `Class`) VALUES ('45', 'Rahul', 'Class 12');



Without Column Name


Syntax


INSERT INTO table_name VALUES(value1, value2, value3, value4, . . . . . . . . . . valueN); 



Example


INSERT INTO Student VALUES ('45', 'Rahul', 'Class 12');



Note: You must be sure that you are entering the values in the same order as the columns exist.

Back To Top