DBA/Developer should not create a CHECK constraint on the WorkOrder table. A CHECK constraint is used to restrict the data allowed for a column to specific values. A CHECK constraint consists of a Boolean expression that evaluates to either TRUE or FALSE. If the expression evaluates to TRUE, the value is allowed for the column, and if the expression evaluates to FALSE, the value is not allowed for the column. CHECK constraints can be defined at the table level or column level, but only CHECK constraints defined at the table level can use columns other than the constrained column in the constraint expression. DBA/Developer should not include the WITH CHECK clause in DBA/Developer FOREIGN KEY constraint because this only enables the constraint. By default, FOREIGN KEY and CHECK constraints are enabled when they are created.
DBA/Developer can use the NOCHECK CONSTRAINT clause of the ALTER TABLE statement to temporarily disable a FOREIGN KEY or CHECK constraint if DBA/Developer needs to insert rows that violate the constraint.
No comments:
Post a Comment