SQL | CHECK Constraint
The CHECK constraint is used to limit the values/value range that can be placed in a column.
If you define a CHECK constraint on a column it will allow only certain values for this column.
If you define a CHECK constraint on a table it can limit the values in certain columns based on values in other columns in the row.
If the value being added to an attribute of a tuple violates the check constraint, the check constraint evaluates to false and the corresponding update is aborted.
Add Check Constraint on New Table
Add Check Constraint on Existing Table
Remove check constraint
View existing constraints on a particular table