syskeys

Provides information about keys associated with indexes, including the columns that make up each index key.

Name Datatype Description
id int The object ID of the table to which the key definition belongs.
type smallint The type of a key record.
The possible values are:
  • 1 – A primary key.
  • 2 – A foreign key.
  • 3 – A common key.
depid int null The object ID of the dependent or referenced table associated with the key.
keycnt int null The number of key columns that contain non-null values in the key definition.
size int null Reserved for internal system use.
key1 ... key8 smallint null The column IDs representing the key columns in the table.
depkey1 ... depkey8 smallint null The column IDs in the dependent or referenced table that correspond to the key columns.
spare1 smallint Reserved for internal system use.