SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-76
Syntax Description of CREATE TABLE
Syntax Description of CREATE TABLE
table
is the ANSI logical name for the new table and must be unique among names of
tables, views, SQL/MP aliases, and procedures within its schema. You cannot
specify a Guardian physical name although you can specify it with the LOCATION
clause.
column data-type
specifies the name and data type for a column in the table. At least one column
definition is required in a CREATE TABLE statement.
store-option is:
PRIMARY KEY
| (key-column-list)
partn-file-option is:
{ [RANGE] PARTITION
[BY (partitioning-column [,partitioning-column]...)]
[(ADD range-partn-defn [,ADD range-partn-defn]...)]
| HASH PARTITION
[BY (partitioning-column [,partitioning-column]...)]
[(ADD partn-defn [,ADD partn-defn]...)]}
range-partn-defn is:
FIRST KEY {col-value | (col-value [,col-value ]...)}
partn-defn
partn-defn is:
LOCATION [\node.]$volume[.subvolume.file-name]
[EXTENT ext-size | (pri-ext-size [,sec-ext-size])]
[MAXEXTENTS num-extents]
[NAME partition-name]
attribute is:
ALLOCATE num-extents
| {AUDITCOMPRESS | NO AUDITCOMPRESS}
| BLOCKSIZE number-bytes
| {CLEARONPURGE | NO CLEARONPURGE}
| EXTENT ext-size | (pri-ext-size [,sec-ext-size])
| MAXEXTENTS num-extents
like-spec is:
LIKE source-table [include-option]...
include-option is:
WITH CONSTRAINTS
| WITH HEADINGS
| WITH PARTITIONS