Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 2.07 KB

sys-key-constraints-transact-sql.md

File metadata and controls

42 lines (36 loc) · 2.07 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic ms.custom f1_keywords helpviewer_keywords dev_langs monikerRange
sys.key_constraints (Transact-SQL)
sys.key_constraints (Transact-SQL)
rwestMSFT
randolphwest
03/15/2017
sql
system-objects
reference
ignite-2024
sys.key_constraints
key_constraints
sys.key_constraints_TSQL
key_constraints_TSQL
sys.key_constraints catalog view
TSQL
>=aps-pdw-2016 || =azuresqldb-current || =azure-sqldw-latest || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric

sys.key_constraints (Transact-SQL)

[!INCLUDE sql-asdb-asdbmi-asa-pdw-fabricdw-fabric]

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

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.

Permissions

[!INCLUDEssCatViewPerm] For more information, see Metadata Visibility Configuration.

See Also

Object Catalog Views (Transact-SQL)
Catalog Views (Transact-SQL)
Querying the SQL Server System Catalog FAQ