SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
K-1
K
Keys
See one of these specific entries:
 Clustering Keys
 Index Keys
 Partitions (first keys)
 Primary Keys
 Syskeys (system-defined primary keys)
 User-Defined Keys (user-defined primary keys)
KEYS Table
The KEYS table is a catalog table that describes the columns of primary keys and 
indexes. Table K-1 describes the contents of the KEYS table.
The columns INDEXNAME through ORDERING (1 through 4) were created in version 
1. Column 5, CPRULESNAME, was added in version 300.
The KEYS table describes the columns of the primary key index and the columns of 
indexes defined with CREATE INDEX. The primary key is handled as an index with the 
same name as the table.
The first entry for an index defined with CREATE INDEX is KEYTAG, although 
KEYTAG is not a column of the table being indexed. For the KEYTAG column, the 
TABLECOLNUMBER column has the value 65535.
Guardian names in KEYS are fully qualified and use uppercase characters.
Table K-1. The KEYS Table
Column Name Data Type Description
1 INDEXNAME * CHAR (34) Name of index
2 KEYSEQNUMBER * SMALLINT
UNSIGNED
Number indicating position of column in index 
row
3 TABLECOLNUMBER SMALLINT
UNSIGNED
Number indicating position of column in table 
row 
4 ORDERING CHAR (1) A if ascending order
D if descending order
5 CPRULESNAME CHAR (34) Name of the collation associated with the 
primary key or index
* Indicates primary key










