Click to Rate and Give Feedback
TechNet
TechNet Library
SQL Server
SQL Server 2008
Database Engine
Technical Reference
 sys.foreign_key_columns (Transact-S...
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
Other versions are also available for the following:
sys.foreign_key_columns (Transact-SQL)

Contains a row for each column, or set of columns, that comprise a foreign key.

Column name

Data type

Description

constraint_object_id

int

ID of the FOREIGN KEY constraint.

constraint_column_id

int

ID of the column, or set of columns, that comprise the FOREIGN KEY (1..n where n=number of columns).

parent_object_id

int

ID of the parent of the constraint, which is the referencing object.

parent_column_id

int

ID of the parent column, which is the referencing column.

referenced_object_id

int

ID of the referenced object, which has the candidate key.

referenced_column_id

int

ID of the referenced column (candidate key column).

In SQL Server 2005 and later versions, the visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. For more information, see Metadata Visibility Configuration.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker