INSERT statement can be written in
two ways.
The first way specifies both the column names and the values to be inserted:
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);
If we add values for all the columns of the table, there is no need to specify the column names in the SQL query. The query syntax would be as follows:
INSERT INTO table_name
VALUES (value1, value2, value3, ...);
However, we have to make sure that values to be inserted follow the same order as the columns in the table's definition.
Login in to like
Login in to comment