Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
sys.key_constraints (Transact-SQL)
Collapse the table of content
Expand the table of content

sys.key_constraints (Transact-SQL)

 

Applies To: SQL Server 2014, SQL Server 2016 Preview

Contains a row for each object that is a primary key or unique constraint. Includes sys.objects.type PK and UQ.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database, Azure SQL Data Warehouse Public Preview.

Column name

Data type

Description

<Columns inherited from sys.objects>

 

For a list of columns that this view inherits, see sys.objects (Transact-SQL).

unique_index_id

int

ID of the corresponding unique index in the parent object that was created to enforce this constraint.

is_system_named

bit

1 = Name was generated by system.

0 = Name was supplied by the user.

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.

Community Additions

ADD
Show:
© 2015 Microsoft