List specific column names
INSERT INTO stock (stock_num, description, unit_price, manu_code)
VALUES (115, 'tyre pump ', 114, 'SHM');
- It generates a serial number for an unlisted serial column.
- It generates a default value for a column with a specific default associated with it.
- It generates a NULL value for any column that allows nulls but
it does not specify a default value for any column that specifies
NULL as the default value.
You must list and supply values for all columns that do not specify a default value or do not permit NULL values.
You can list the columns in any order, as long as the values for those columns are listed in the same order. For information about how to designate null or default values for a column, see the Informix® Database Design and Implementation Guide.
stock_num manu_code description unit_price unit unit_descr
115 SHM tyre pump 114
Both unit and unit_descr are blank, which indicates
that NULL values exist in those two columns. Because the unit column
permits NULL values, the number of tire pumps that can be purchased
for $114 is not known. Of course, if a default value of box
were
specified for this column, then box
would be the
unit of measure. In any case, when you insert values into specific
columns of a table, pay attention to what data is needed for that
row.