SQL Guide : Database system tables and system views : System tables : SYS_KEYS
  
SYS_KEYS
All database tables must have one clustering key. This key defines the physical sorting order of the data. It has no capacity impact. If a primary key is defined, the primary key is used as the clustering key. If no primary key is defined, an entry with key_name "$CLUSTKEY_xxxxx" will be automatically created in SYS_KEYS.
If there is a primary key definition for the table, there will be an entry in SYS_KEYS with a key_name like "$PRIMARYKEY_xxxx" for this entry. The key_primary and key_clustering columns will have a value YES.
If there is no primary key definition for the table, there will be an entry in SYS_KEYS with a key_name like "$CLUSTKEY_xxxxx". The key_primary column will have a value NO and key_clustering column will have a value YES.
Column name
Data type
Description
ID
INTEGER
Unique key identifier.
REL_ID
INTEGER
The relation identifier as in SYS_TABLES.
KEY_NAME
WVARCHAR
The name of the key.
KEY_UNIQUE
CHAR
Is the key unique (Yes, No).
KEY_NONUNIQUE_ODBC
SMALLINT
ODBC, is the key NOT unique (1, 0).
KEY_CLUSTERING
CHAR
Is the key a clustering key (Yes, No).
KEY_PRIMARY
CHAR
Is the key a primary key (Yes, No).
KEY_PREJOINED
CHAR
Reserved for future use.
KEY_SCHEMA
WVARCHAR
The owner of the key.
KEY_NREF
INTEGER
When creating a primary key, the server uses ALL fields of the table, even if the user specified N fields (the N fields specified by the user become the first N fields of the key). KEY_NREF = N, i.e. the number of fields specified by the user.
See also
System tables