9. Extended Statements : Create Table (extended) : Column Specifications : With|Not Null and With|Not Default Combinations
 
Share this page                  
With|Not Null and With|Not Default Combinations
The WITH|NOT NULL clause works in combination with the WITH|NOT DEFAULT clause, as follows:
WITH NULL
The column accepts nulls. If no value is provided, a null is inserted.
NOT NULL
The column is mandatory and does not accept nulls, which is typical for primary key columns.
WITH NULL WITH DEFAULT
The column accepts null values. If no value is provided, the default value is inserted.
WITH NULL NOT DEFAULT
The column accepts null values. The user must provide a value (mandatory column).
NOT NULL WITH DEFAULT
The column does not accept nulls. If no value is provided, the default value is inserted. (The specified default value cannot be NULL.)
NOT NULL NOT DEFAULT (or NOT NULL)
The column is mandatory and does not accept nulls, which is typical for primary key columns.