Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > INSERT >

Inserting NULL Values

When you execute the INSERT statement, the database server inserts a NULL value into any column for which you provide no value, as well as for all columns that have no default values and that are not listed explicitly. You also can specify the NULL keyword in the VALUES clause to indicate that a column should be assigned a NULL value.

The following example inserts values into three columns of the orders table:

INSERT INTO orders (orders_num, order_date, customer_num) VALUES (0, NULL, 123)

In this example, a NULL value is explicitly entered in the order_date column, and all other columns of the orders table that are not explicitly listed in the INSERT INTO clause are also filled with NULL values.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]