sysconstraints

Provides information about table constraints such as CHECK constraints, referential constraints, rules, and other integrity constraints.

Name Datatype Description
colid smallint A column ID.
constrid int The object ID of the constraint.
tableid int The object ID of the table on which the constraint is defined.
error int The ID of the error message associated with the constraint.
status int The status type associated with the constraint or trigger.
Constraint types:
  • 0x0040 – A referential constraint.
  • 0x0080 – A check constraint.
  • 0x0100 – A computed column object constraint.

Trigger status:
  • 0x0080 – A delete trigger.
  • 0x0100 – An insert trigger.
  • 0x0200 – An update trigger.
  • 0x0400 – A disabled trigger.
spare2 int Not used.