Inserting Rows with INSERT
The INSERT statement adds new rows to a table. In this section, I’ll explain how to use several variations of INSERT to:
Insert a row by using column positions (INSERT VALUES)
Insert a row by using column names (INSERT VALUES)
Insert rows from one table into another table (INSERT SELECT)
The important characteristics of INSERT are:
In a positional insert, you insert ordered values into a new row in the same sequence as the columns appear in a table (see “To insert a row by using column positions” later in this section). In a named-column insert, you name the specific column into which each value is inserted in the new row (see “To insert a row by using column names” later in this section).
You always should use a named-column ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access