The system table sysconstraints contains one row for every integrity constraint that is defined for a database object using the CREATE TABLE or ALTER TABLE statement. : sysconstraints « System Tables Views « SQL Server / T-SQL Tutorial
status The type of the integrity constraint: 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
7>
8>
9> select top 10 * from sysconstraints;
10> GO
constid id colid spare1 status actions error
----------- ----------- ------ ------ ----------- ----------- -----------
1131151075 1115151018 6 0 133141 4096 0
(1 rows affected)
27.26.sysconstraints
27.26.1.
The system table sysconstraints contains one row for every integrity constraint that is defined for a database object using the CREATE TABLE or ALTER TABLE statement.