NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-147
CREATE TABLE Statement
If you omit this clause, the default heading is the column name.
See HEADING Clause
on page H-1 for more information.
[ PRIMARY ] KEY key-column-list
specifies the set of columns that make up the primary key for a key-sequenced table.
Each column in the set must be a column previously defined for the table. The
columns do not need to be contiguous, but their combined length cannot exceed 255
bytes.
SQL stores and retrieves rows in ascending or descending order, as specified, for the
first column in the list. If multiple rows have the same value in the first column,
SQL uses values in the second column to determine the order. If those are the same,
SQL uses the third column, and so on.
You can specify only one primary key (or one clustering key) for any particular key-
sequenced table. If you do not specify either the PRIMARY KEY clause or
CLUSTERING KEY clause for a key-sequenced table, SQL adds a SYSKEY
column to the table to use as the primary key.
Columns in the primary key definition cannot be updated and cannot contain null
values, even if you omit the NOT NULL clause in the column definition.
See Primary Keys
on page P-27, Syskeys on page S-90, or Clustering Keys on
page C-26 for more information.
CATALOG catalog
specifies the catalog to hold the description of the table. The catalog and the table
must be on the same node. The default is the current default catalog.
PHYSVOL volume-name
If ServerWare SMF is installed on your node, the PHYSVOL option directs SQL to
override ServerWare SMF and place the table or primary table partition on the
physical volume volume-name. For volume-name, specify either a physical
volume or equivalent DEFINE.
This option is available only if you specify a virtual volume for table. volume-
name must belong to the virtual volume you specify.
You can specify a physical volume for each secondary partition in the PARTITION
clause.
CLUSTERING KEY key-column-list
specifies the set of columns that make up a clustering key for a key-sequenced table.
Each column in the set must be a column previously defined for the table. The
columns do not need to be contiguous, but their combined length cannot exceed 247
bytes (not including the 8-byte SYSKEY).
You can specify only one clustering key (or one primary key) for any particular key-
sequenced table. If you do not specify either the PRIMARY KEY clause or