| title | sys.sysforeignkeys (Transact-SQL) | Microsoft Docs | ||||
|---|---|---|---|---|---|
| ms.custom | |||||
| ms.date | 03/15/2017 | ||||
| ms.prod | sql | ||||
| ms.prod_service | database-engine | ||||
| ms.reviewer | |||||
| ms.technology | system-objects | ||||
| ms.topic | language-reference | ||||
| f1_keywords |
|
||||
| dev_langs |
|
||||
| helpviewer_keywords |
|
||||
| ms.assetid | 41544236-1c46-4501-be88-18c06963b6e8 | ||||
| author | rothja | ||||
| ms.author | jroth |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]
Contains information about the FOREIGN KEY constraints that are in the definitions of tables in the database.
Important
[!INCLUDEssnoteCompView]
| Column name | Data type | Description |
|---|---|---|
| constid | int | ID of the FOREIGN KEY constraint. |
| fkeyid | int | Object ID of the table with the FOREIGN KEY constraint. |
| rkeyid | int | Object ID of the table referenced in the FOREIGN KEY constraint. |
| fkey | smallint | ID of the referencing column. |
| rkey | smallint | ID of the referenced column. |
| keyno | smallint | Position of the column in the reference column list. |
Mapping System Tables to System Views (Transact-SQL)
Compatibility Views (Transact-SQL)