Single rows
In its simplest form, the INSERT statement creates one
new row from a list of column values and puts that row in the table.
The following statement shows how to add a row to the stock table:
INSERT INTO stock
VALUES (115, 'PRC', 'tire pump', 108, 'box', '6/box');
The stock table
has the following columns:
- stock_num
- A number that identifies the type of merchandise.
- manu_code
- A foreign key to the manufact table.
- description
- A description of the merchandise.
- unit_price
- The unit price of the merchandise.
- unit
- The unit of measure
- unit_descr
- Characterizes the unit of measure.
The values that are listed in the VALUES clause in the preceding example have a one-to-one correspondence with the columns of the stock table. To write a VALUES clause, you must know the columns of the tables as well as their sequence from first to last.