The Check object represents the attributes of a single Microsoft® SQL Server™ integrity constraint.
A SQL Server integrity constraint can be defined as part of a CREATE TABLE statement or can be added to, or removed from, a table as part of an ALTER TABLE statement.
With the Check object, you can:
The Name property represents a constraint name. It is character data and must be unique within a SQL Server database.
To create a SQL Server integrity constraint
Adding the Check object to its containing collection generates the appropriate CREATE statement. Specify only the integrity test condition in the Text property.
To remove a SQL Server integrity constraint
Remove Method (Objects) | Script Method |
Checked Property | Name Property |
ExcludeReplication Property | Text Property |
ALTER TABLE | CREATE TABLE |