This section shows you how to define constraints for table columns when you create a database table or change a table definition. A constraint for the values of a column is composed of one or more conditions that you formulate line-by-line and can link together.
You have already defined the table columns.
You can only formulate constraints for columns with valid column definitions.
1. In the Name field, enter a name for the constraint (optional).
2. In the Column field, select the column that you want to formulate the condition for.
3. In the Predicate field, select a predicate for the condition. To negate the condition, use the NOT operator !. Negation is not possible with relational operators.
4.
In the Expression
field, enter the relational expression for the condition, and confirm it with
Enter.
When you enter the relational
expression, you can choose between the following options:
Option |
Meaning |
Single Value |
The expression consists of a single value. |
ALL |
The condition must be fulfilled with all expressions in the list (Expression List). |
ANY |
The condition must be fulfilled with at least one expression in the list (Expression List). |
DEFAULT |
The expression consists of the default value of the column. |
5. Enter how the formulated condition is to be linked with the next condition (AND/OR).
If you retrospectively reset the relation type to <none>, all subsequently formulated conditions are deleted immediately.
6. To insert a new constraint, choose New Constraint.
7. To insert new constraints and at the same time copy the definition of existing constraints in the same table, select the required constraints, and choose Copy Constraint.
8. To insert new constraints and copy the definition of existing constraints from existing tables, choose Import Constraint. A window opens, containing all constraints defined by the current user. Select one or more constraints and choose OK to confirm.
9. In order to delete a constraint, select the constraint and choose Remove Constraint.