Populating a table With rows v15
Use the INSERT
statement to populate a table with rows:
All data types use obvious input formats. Constants that aren't simple numeric values usually are surrounded by single quotes ('), as in the example. The DATE
type is flexible in what it accepts. However, for this tutorial we use the unambiguous format shown here.
The syntax used so far requires you to remember the order of the columns. An alternative syntax allows you to list the columns explicitly:
You can list the columns in a different order if you want or even omit some columns, for example, if the commission is unknown:
Many developers consider explicitly listing the columns better style than relying on the order implicitly.