SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—523725-004
2-77
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.
column is an SQL identifier. column must be unique among column names in the 
table. If the name is an SQL/MX reserved word, you must delimit it by enclosing it 
in double quotes. Such delimited parts are case-sensitive. For example: ”join". 
column cannot be SYSKEY if the clustering key contains SYSKEY. 
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]...)]}
 FIRST KEY {col-value | (col-value [,col-value ]...)} 
 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 










