Share via


sys.check_constraints (Transact-SQL)

Contains a row for each object that is a CHECK constraint, with sys.objects.type = 'C'.

Column name

Data type

Description

<Columns inherited from sys.objects>

 

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

is_disabled

bit

CHECK constraint is disabled.

is_not_for_replication

bit

CHECK constraint was created with the NOT FOR REPLICATION option.

is_not_trusted

bit

CHECK constraint has not been verified by the system for all rows.

parent_column_id

int

0 indicates a table-level CHECK constraint.

Non-zero value indicates that this is a column-level CHECK constraint defined on the column with the specified ID value.

definition

nvarchar(max)

SQL expression that defines this CHECK constraint.

SQL Server 2008 differs from SQL Server 2000 in the way it decodes and stores SQL expressions in the catalog metadata. The semantics of the decoded expression are equivalent to the original text; however, there are no syntactic guarantees. For example, white spaces are removed from the decoded expression. For more information, see, Behavior Changes to Database Engine Features in SQL Server 2008.

uses_database_collation

bit

1 = The constraint definition depends on the default collation of the database for correct evaluation; otherwise, 0. Such a dependency prevents changing the database default collation.

is_system_named

bit

1 = Name was generated by system.

0 = Name was supplied by the user.

Permissions

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.