solidDB Help : solidDB reference : SQL: 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 should be an entry in SYS_KEYS with a KEY_NAME like "$PRIMARYKEY_xxxx" for this entry. The KEY_PRIMARY and KEY_CLUSTERING columns should have a value of YES.
If there is no primary key definition for the table, there should be an entry in SYS_KEYS with a KEY_NAME like "$CLUSTKEY_xxxxx". The KEY_PRIMARY column should have a value of NO and the KEY_CLUSTERING column should have a value of YES.
The columns in the SYS_KEYS system table are described in the following table:
 
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, that is, the number of fields specified by the user.
Go up to
System tables