ALLBASE/SQL Reference Manual (36216-90216)

356 Chapter10
SQL Statements A - D
CREATE TABLE
separately in another section below.
UNIQUE HASH ON specifies a hash structure for the table. Only UNIQUE HASH
structures may be created, and updates on hash key columns are not
permitted (you must first delete, then insert the row with the new key
value).
HashColumnName
specifies a column defined in the table that is to participate in the hash
key of this table.
PrimaryPages
specifies the number of pages used as primary hash buckets. The
minimum is 1 and the maximum is determined by the formula
16*((|2
31
)2072). For good results, use a prime number.
HASH ON CONSTRAINT specifies that the named unique constraint be managed through
the use of hash table storage. The unique constraint's columns become the
hash key columns.
ConstraintID
is an optional name specified for the constraint. If none is supplied, one is
generated, as described under "Description" below.
IN PARTITION specifies what partition the table will be in for the purposes of audit
logging.
PartitionName
specifies the partition for the table.
DEFAULT specifies that the default partition of the database will be used. The
number associated with the default partition is determined at the time the
INSERT, UPDATE, or DELETE is executed on the table. If the default
partition is NONE at that time, audit logging of the operation is not done.
Any change to the default partition number occurring in a START DBE
NEWLOG statement alters the partition number that audit logging uses on
tables that are in the default partition.
NONE specifies that this table is assigned to no partition, and so will have no
audit logging done on it.
CLUSTERING ON CONSTRAINT specifies that the named unique or referential constraint
be managed through a clustered index structure rather than nonclustered.
The unique constraint's unique column list, or referential constraint's
referencing column list, becomes the clustered key.
IN
DBEFileSetName1
causes the index and data pages in which table information is
stored to be allocated from DBEFiles associated with the specified
DBEFileSet. (Names of available DBEFileSets are recorded in the
SYSTEM.DBEFILESET view.) If a DBEFileSet name is not specified, the
table is created in the default TABLESPACE DBEFileSet. (Refer to syntax
for the SET DEFAULT DBEFILESET statement.)
You can create a nonhash table in an empty DBEFileSet, but cannot
INSERT any rows or create any indexes for the table until the DBEFileSet
has DBEFiles associated with it.
You cannot create a hash structure in an empty DBEFileSet.