You can change check constraints to the table that you
are creating. A check constraint sets restrictions on data added to
the table. Check constraints are enforced whenever rows in the table
are inserted or updated.
Before you begin
To
change check constraints, you must have at least one of the following
privileges on the table to be altered:
- ALTER privilege
- CONTROL privilege
- DBADM authority
- ALTERIN privilege on the schema of the table
Note: To change the definition of a existing column (in a database
that is Version 8.2 or greater), you must have DBADM authority.
Procedure
- To change check constraints using the Control Center:
- Open the Change Check Constraint window:
From the Control Center, expand the object tree until you find the
Tables folder. Right-click the Tables folder
and select Create from the pop-up menu. The Create
Table wizard opens. On the Constraints page,
select a constraint in the table and click Change. The Change Check Constraint window
opens.
- Specify the check condition for the constraint that
you are changing.
- Optional: Type a name for the check constraint.
- Optional: Type a comment to document the check constraint.
- To change check constraints using the command line, use
the ALTER TABLE statement.