ODBC Server Reference Manual
CORE SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
3-40
CREATE TABLE
column-definition
defines the characteristics of a single column in the table being created, as follows:
column-identifier
specifies a column in the table. The column-identifier must be unique for
columns defined in the table.
data-type
is the CORE SQL data type for the column. Data types are converted to
NonStop SQL/MP data types. Data types are described under Language
Elements on page 3-2.
DEFAULT default-value
specifies a default value to be placed in each row in the referenced column
when the table is created. The default value can be any of the following:
Because of NonStop SQL/MP restrictions, a literal used as a
default-value cannot be longer than 8 characters. If you specify the USER
option, the logical username also cannot be longer than 8 characters.
If you omit this entry, NULL is used.
column-constraint-definition
specifies any constraints to be placed on the referenced column.
NOT NULL specifies that the column cannot contain null values. NOT NULL
can appear not more than once in a column definition.
No other column constraints are supported.
table-constraint-definition
specifies constraints to be placed on one or more columns.
PRIMARY KEY ( column-identifier [‚ column-identifier ] ... )
states that each row is constrained to contain a different value in the specified
column or columns. Each specified column must also be constrained by NOT
NULL.
default-value Value Assigned
literal The specified value
NULL A null value
SYSTEM A timestamp issued at the time the default is used
USER A character string containing the logical username of the
current user