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.

To add new check constraints:
- Click on the Check Constraints tab.
- Click on Add. The Add Check Constraint window
opens.
- In the Check condition box, specify the
check condition for the constraint that you're defining.
- Optional: In the Constraint name
field, type a name for the check constraint.
- Optional: In the Comment field,
type a comment to document the new check constraint.
- Click on Add to add the new check constraint.
- Repeat steps 3 through 6 to add another check constraint to your
table.
- Click on Close to close the Add Check Constraint window.
- Click on OK to create your table and close the Create Table
notebook.

Related information
- Check constraints --
See
the SQL Reference
- Check conditions --
See
the SQL Reference
[ Top of Page |
Table of Contents |
Glossary |
Index ]
[ DB2 List of Books |
Search the DB2 Books ]