Defines the attributes of a column. There must be at least one column definition and no more than 8000 column definitions.
The sum of the row buffer byte counts of the columns must not be greater than 32766 or, if a VARCHAR or VARGRAPHIC column is specified, 32740. Additionally, if a LOB is specified, the sum of the row data byte counts of the columns must not be greater than 3.5 gigabytes. For information on the byte counts of columns according to data type, see Notes.
If the system-column-name is not specified, and the column-name is not a valid system-column-name, a system column name is generated. For more information about how system column names are generated, see Rules for Column Name Generation.
A ROWID column or a DATALINK column with FILE LINK CONTROL cannot be specified for a global temporary table.
Data type | Default value |
---|---|
Numeric | 0 |
Fixed-length character or graphic string | Blanks |
Fixed-length binary string | Hexadecimal zeros |
Varying-length string | A string length of 0 |
Date | The current date at the time of INSERT |
Time | The current time at the time of INSERT |
Timestamp | The current timestamp at the time of INSERT |
Datalink | A value corresponding to DLVALUE('','URL','') |
distinct-type | The default value of the corresponding source type of the distinct type. |
Omission of NOT NULL and DEFAULT from a column-definition is an implicit specification of DEFAULT NULL.
If the value specified is not valid, an error is returned.
For an identity column, the database manager inserts a specified value but does not verify that it is a unique value for the column unless the identity column has a unique constraint or a unique index that solely specifies the identity column.
An identity column is implicitly NOT NULL. See the AS IDENTITY clause in CREATE TABLE for the descriptions of the identity attributes.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.