Constraints : Constraints « Constraints « SQL Server / T-SQL Tutorial






Constraints are used by SQL Server to enforce column data integrity.
Both primary and foreign keys are forms of constraints.
Other forms of constraints used for a column include:
UNIQUE constraints enforce uniqueness within a table on non-primary key columns.
DEFAULT constraints can be used when you do not know the value of a column in a row when it is first inserted into a table.
CHECK constraints are used to define the data format and values allowed for a column.








7.1.Constraints
7.1.1.Constraints
7.1.2.Disabling and Enabling a Constraint
7.1.3.Disable checking on all constraints
7.1.4.Enable checking on all constraints
7.1.5.Dropping a Constraint from a Table