NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-154
Examples—CREATE TABLE
NO AUDIT;
Some of the attributes specified apply to the entire table and some only to the
primary partition. NOPURGEUNTIL, NO AUDIT, and LOCKLENGTH apply to all
partitions. The example specifies NO AUDIT for an initial load operation, after
which the attribute can be changed to AUDIT. The EXTENT and MAXEXTENTS
attributes apply to the primary partition.
The following example creates a partitioned, key-sequenced table with a clustering
key:
CREATE TABLE HD.HISTORY (
REGION_ID INTEGER,
SYSTEM_ID SMALLINT UNSIGNED,
CPU SMALLINT UNSIGNED,
PIN SMALLINT UNSIGNED,
PROGRAM_FILE_NAME VARCHAR (34),
AGE LARGEINT
)
CATALOG HC
CLUSTERING KEY (REGION_ID DESC, SYSTEM_ID)
PARTITION (
\SA.$VOL1.HD.HISTORY FIRST KEY
( 1000 -- region_id
-- system_id has low value
)
CATALOG \SA.$VOL1.HC,
\NA.$VM.HD.HISTORY FIRST KEY
( 500 -- region_id
-- system_id has low value
)
CATALOG \NA.$VM.HC
);