To insert new data in a table INSERT INTO statement is used.
There is two type of statement for insert data in a table .
In first statement the column names does not specify where the data will be inserted, only their values are specify.
INSERT INTO table
(column1, column2, ... column_n )
VALUES
(value1, value2, ... value_n );
In the second statement both the column names and the values are specifies for insert data or record.
INSERT INTO table
(column1, column2, ... column_n )
SELECT value1, value2, ... value_n
FROM source_table
WHERE conditions;
Here column1,column2,column3,... are the column name and value1,value2,value3,... are the values.
INSERT INTO students
(student_id, student_name)
VALUES
(40, 'DAV');