INSERT INTO

Syntax

Option 1: specify both the column names and the values to be inserted

Option 2: if inserting into all columns of the table, can omit the column names, but must ensure that the order of values listed is the same as the column order


Examples

#1

Insert a new record into the table:

Note: Did not need to insert a number in the CustomerID field, as it is an auto-increment field that will be automatically generated when a new record is inserted.


References

Link to the tutorial: https://www.w3schools.com/sql/sql_insert.asp

2019-01-18