ODBC Server Reference Manual
CORE SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
3-39
CREATE TABLE
CREATE TABLE
Use CREATE TABLE to create new tables. The file security for the table is obtained
from the default permissions associated with the user’s logon name.
The CREATE TABLE statement has the following syntax:
base-table-name
specifies the table to be created. The table-name can be qualified with the
database name and owner name. The fully expanded table name must be unique
in the network.
If the owner-name is omitted, the current user’s name is used.
CREATE TABLE base-table-name
( column-element [, column-element ] ... )
column-element is:
column-definition | table-constraint-definition
column-definition is:
column-identifier data-type [ DEFAULT default-value ]
[ column-constraint-definition
[‚ column-constraint-definition ] ... ]
default-value is:
[ literal ]
[ NULL ]
[ USER ]
column-constraint-definition is:
[ NOT NULL ]
[ ]
[ UNIQUE ]
[ PRIMARY KEY ]
table-constraint-definition is:
[ PRIMARY KEY ]
[ ( column-identifier [‚ column-identifier ] ...) ]
[ ]
[ UNIQUE ]
[ ( column-identifier [‚ column-identifier ] ...) ]
[ CHECK ( search-condition ) ]