Adding check constraints when creating a table

Use the Check Constraints page of the Create Table notebook to add check constraints to your table. A check constraint sets restrictions on data added to the table. Check constraints are enforced when rows in the table are inserted or updated.

You can define a check constraint which references a single column by specifying that column in the Check condition box.

You can add, change, or remove new check constraints for your table. After the table is created, you must use the Alter function to add, change, or remove check constraints.

Fields and controls



To add new check constraints:

  1. Click on the Check Constraints tab.

  2. Click on Add. The Add Check Constraint window opens.

  3. In the Check condition box, specify the check condition for the constraint that you're defining.

  4. Optional: In the Constraint name field, type a name for the check constraint.

  5. Optional: In the Comment field, type a comment to document the new check constraint.

  6. Click on Apply to add the new check constraint.

  7. Repeat steps 3 through 6 to add another check constraint to your table.

  8. Click on Cancel to close the Add Check Constraint window.

  9. Click on OK to create your table and close the Create Table notebook.


Related information