Check Constraint

The CHECK Constraint enables a condition to check the value being entered into a record. If the condition returns to false, the record violates the constraint and isn’t entered into the table.

If you define a CHECK constraint on a single column it allows 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.

examples:–

Advertisements