Adding check constraints

These steps are part of the larger tasks of creating a table and altering a table. When you complete the steps for adding check constraints, return to either creating a table or altering a table.



To add new check constraints:

  1. In the Add Check Constraint window, in the Check condition box, specify the check condition for the constraint that you're defining.

    If you are adding the check constraint when altering a table and the table has data, the way that the new check constraint is enforced on the existing data depends on the value of the CURRENT RULES special register:

  2. Optional: In the Constraint name box, type a name for the check constraint. If you do not specify a constraint name, one is generated for you.
  3. Click Apply to add the new check constraint.
  4. Repeat steps 1 through 3 to add another check constraint to your table.
  5. Click Close to close the Add Check Constraint window.

Depending on the task that you were doing when you added this check constraint, return to either creating a table or altering a table.