在表或列上声明的每个参照完整性约束在 sysreferences 中都有相应的
一行。
| 名称 | 数据类型 | 说明 |
|---|---|---|
| indexid | smallint | 被引用列上的唯一索引的 ID |
| constrid | int | 仅供将来使用 |
| qpdate | datetime null | 来自 sysobjects 的约束的对象 ID |
| tableid | int | 引用表的对象 ID |
| reftabid | int | 被引用表的对象 ID |
| keycnt | smallint | 外键中的列数 |
| status | smallint | 选项和指示符 |
| frgndbid | smallint null | 包含被引用表 (具有外键的表)的数据库的数据库 ID |
| pmrydbid | smallint | 包含被引用表(具有主键的表)的数据库的数据库 ID |
| spare2 | int | 保留。 |
| fokey1 ... fokey16 | smallint | 第 1 至第 16 个引用列的列 ID |
| refkey1 ... refkey16 | smallint | 第 1 至第 16 个被引用列的列 ID |
| frgndbname | varchar(30) null | 包含引用表(具有外键的表)的数据库的名称;如果引用表在当前数据库中,则为 NULL |
| pmrydbname | varchar(30) null | 包含被引用表(具有主键的表)的数据库的名称;如果被引用表在当前数据库中,则为 NULL |