Syntax
DBCC CHECKCONSTRAINTS
[('table' | table_id | 'constraint' | constraint_id) ]
[ WITH
[ { ALL_CONSTRAINTS | ALL_ERRORMSGS } ]
[ , ] [ NO_INFOMSGS ]
]
Key:
ALL_CONSTRAINTS Checks all enabled and disabled constraints on the table if the table name is specified or if all tables are checked; otherwise, checks only the enabled constraint.
ALL_CONSTRAINTS has no effect when a constraint name is specified.
ALL_ERRORMSGS Returns all rows that violate constraints in the table that is checked. The default is the first 200 rows.
NO_INFOMSGS Suppresses all informational messages.
“The practice of both mathematics and art requires a blend of discipline and vision--a delicate balancing of constraint and freedom” ~ Ivars Peterson
DBCC CHECKTABLE - Check integrity of a table or indexed view.