NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-131
Considerations—CREATE COLLATION
Considerations—CREATE COLLATION
Authorization requirements
CREATE COLLATION requires read and write authority for the catalog in which
the new collation is registered. The FROM clause requires read authority for the
source file. The LIKE clause requires read authority for the existing collation
coll and for the associated catalog tables.
Examples—CREATE COLLATION
The following example statement creates a collation named TRANSL2 from the
definition in the EDIT file $DATA.COLL.TRANSL2:
CREATE COLLATION TRANSL2 FROM $DATA.COLL.TRANSL2;
CREATE CONSTRAINT Statement
CREATE CONSTRAINT is a DDL statement that defines a constraint for a table. When
a constraint is in effect, all rows in the table, either directly or through a view, must
satisfy the constraint.
constraint
is the name of the constraint. constraint must be an SQL identifier that is
unique for the associated table. If ServerWare SMF is installed on your node, the
name of the associated table must be either a virtual or direct name.
ON table
specifies the table associated with the constraint (or an equivalent DEFINE).
If table is a partition, the constraint applies to the entire table to which the
partition belongs. To create a constraint that applies only to a specific partition,
include the range of key values as part of the CHECK clause criteria. For example, a
constraint on a partition of the PARTLOC table in the sample database could include
the following clause:
CHECK LOC_CODE >= "G00" AND LOC_CODE < "P00"
CHECK condition
is a search condition that specifies the conditions of the constraint and that is
satisfied by all existing rows of table. The search condition must follow these
rules:
The text of the condition must have fewer than 3,000 bytes.
CREATE CONSTRAINT constraint ON table
CHECK condition