| title | sys.sysconstraints (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 | f2b2e2ad-ba24-48a1-913c-8ee4e0895dc4 | ||||
| author | rothja | ||||
| ms.author | jroth |
[!INCLUDEtsql-appliesto-ss2012-xxxx-xxxx-xxx-md]
Contains mappings of constraints to the objects that own the constraints within the database.
Important
[!INCLUDEssnoteCompView]
| Column name | Data type | Description |
|---|---|---|
| constid | int | Constraint number. |
| id | int | ID of the table that owns the constraint. |
| colid | smallint | ID of the column on which the constraint is defined. 0 = Table constraint |
| spare1 | tinyint | Reserved |
| status | int | Pseudo-bit-mask indicating the status. Possible values include the following: 1 = PRIMARY KEY constraint 2 = UNIQUE KEY constraint 3 = FOREIGN KEY constraint 4 = CHECK constraint 5 = DEFAULT constraint 16 = Column-level constraint 32 = Table-level constraint |
| actions | int | Reserved |
| error | int | Reserved |
Mapping System Tables to System Views (Transact-SQL)
Compatibility Views (Transact-SQL)