Correct and Incorrect Constraints

Previous Next

Each constraint must be checked for correctness before it can be applied at runtime. If the check is successful, the setting Correct = Yes is applied to the constraint.

By default, a new constraint has Correct = No. You must check the constraint when you have finished writing it so that it is set to Corrrect = Yes.

Constraints that do not have Correct = Yes are silently ignored at runtime, even if they have Active = Yes.

Good practice is to avoid constraints that have Correct = No and Active = Yes. Best practice is to make sure that all constraints have Correct = Yes and Active = Yes.

When you check a constraint, SQL syntax is validated. Also, the existence of the objects (tables, columns ...) that the constraint refers to is checked.

When you edit constraint SQL or when you rename or drop objects that it refers to, the constraint is automatically reset to Correct = No.

 

See Also

Active and Inactive Constraints

Overview of Constraints