NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
U-17
User-Defined Keys
Guardian names in USAGES are fully qualified and use uppercase characters. Names of
SQL programs in OSS files are stored as the corresponding ZYQ Guardian names, not
OSS pathnames.
User-Defined Keys
A user-defined primary key is made up of the columns specified in the PRIMARY KEY
clause of the CREATE TABLE statement when the table is created. Values for a user-
defined primary key must be unique within the table. Only a table stored in a key-
sequenced file can have a user-defined primary key.
Each column in the primary key has an ordering characteristic (either ascending or
descending) that determines the order for storing and retrieving the rows. If multiple
rows share the same value for the first column of the primary key, the value and the
ordering characteristic of the second column determines the order for storing or
retrieving the rows, and so forth.
The columns in a primary key cannot contain null values and cannot be updated.
The length of a primary key cannot exceed 255 bytes. To calculate the length of the key,
add the number of bytes in the columns that make up the key. For each varying-length
character column, add 2 to the byte count determined by the number and size of the
characters allowed in the column. (SQL uses the two additional bytes to store the
character count.)
The system does not generate a SYSKEY for a table that has a user-defined primary key.
Utilities
SQLCI includes a variety of utilities that perform database maintenance tasks and that
access editors and other commonly used Guardian utilities from within an SQLCI
session.
The following SQLCI commands access SQLCI utilities:
CLEANUP INVOKE
CONVERT LOAD
COPY MODIFY CATALOG
DISPLAY USE OF MODIFY LABEL
DOWNGRADE CATALOG MODIFY REGISTER
DOWNGRADE SYSTEM
CATALOG
PERUSE
DUP PURGE
EDIT PURGEDATA
EXPLAIN SECURE
FILEINFO TEDIT