sys.sysreferences (Transact-SQL)

适用于:Microsoft Fabric 的 Microsoft Fabric Warehouse 中的 SQL Server Azure SQL 托管实例 Azure Synapse Analytics Analytics Platform System (PDW) SQL 分析终结点

包括 FOREIGN KEY 约束定义到数据库中被引用列的映射。

重要

将此 SQL Server 2000 系统表作为一个视图包含进来是为了保持向后兼容性。 建议您改用最新的 SQL Server 系统视图。 若要查找一个或多个等效系统视图,请参阅将系统表映射到系统视图 (Transact-SQL)。 后续版本的 Microsoft SQL Server 将删除该功能。 请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。

列名称 数据类型 描述
constid int FOREIGN KEY 约束的 ID。
fkeyid int 执行引用表的 ID。
rkeyid int 被引用表的 ID。
rkeyindid smallint 包含被引用的键列的被引用表的唯一索引的索引 ID。
keycnt smallint 键中的列数。
forkeys varbinary(32) 标识为仅供参考。 不支持。 不保证以后的兼容性。
refkeys varbinary(32) 标识为仅供参考。 不支持。 不保证以后的兼容性。
fkeydbid smallint 保留。
rkeydbid smallint 保留。
fkey1 smallint 引用列的列 ID。
fkey2 smallint 引用列的列 ID。
fkey3 smallint 引用列的列 ID。
fkey4 smallint 引用列的列 ID。
fkey5 smallint 引用列的列 ID。
fkey6 smallint 引用列的列 ID。
fkey7 smallint 引用列的列 ID。
fkey8 smallint 引用列的列 ID。
fkey9 smallint 引用列的列 ID。
fkey10 smallint 引用列的列 ID。
fkey11 smallint 引用列的列 ID。
fkey12 smallint 引用列的列 ID。
fkey13 smallint 引用列的列 ID。
fkey14 smallint 引用列的列 ID。
fkey15 smallint 引用列的列 ID。
fkey16 smallint 引用列的列 ID。
rkey1 smallint 被引用列的列 ID。
rkey2 smallint 被引用列的列 ID。
rkey3 smallint 被引用列的列 ID。
rkey4 smallint 被引用列的列 ID。
rkey5 smallint 被引用列的列 ID。
rkey6 smallint 被引用列的列 ID。
rkey7 smallint 被引用列的列 ID。
rkey8 smallint 被引用列的列 ID。
rkey9 smallint 被引用列的列 ID。
rkey10 smallint 被引用列的列 ID。
rkey11 smallint 被引用列的列 ID。
rkey12 smallint 被引用列的列 ID。
rkey13 smallint 被引用列的列 ID。
rkey14 smallint 被引用列的列 ID。
rkey15 smallint 被引用列的列 ID。
rkey16 smallint 被引用列的列 ID。

另请参阅

将系统表映射到系统视图 (Transact-SQL)
兼容性视图 (Transact-SQL)