Oracle Maestro online help
Prev | Return to chapter overview | Next |
Checks
A check constraint is the most generic constraint type. It allows you to specify that the value in a certain column must satisfy a Boolean (truth-value) expression.
Check Properties allows you to add a new check constraint or edit an existing one. It is available from Table Editor, or from the corresponding nodes of the explorer tree.
Checks are created within Check Properties. In order to run the wizard you should either
or
or
|
Checks are edited within the Check Properties dialog window. In order to open the dialog you should either
or
You can change the name of the check using the Rename Check dialog. To open the dialog you should either
or
|
To drop the check:
or
and confirm dropping in the dialog window.
|
Name
Here you can set and edit the check name.
Condition
Specify an expression producing a Boolean result which new or updated rows must satisfy for an insert or update operation to succeed. Expressions evaluating to True or Unknown succeed. In case any row of an insert or update operation produce a FALSE result an error exception is raised and the insert or update does not alter the database.
Enabled
When checked, the check is enforced.
Validated
The behavior of the clause always depends on whether the constraint is enabled or disabled, either explicitly or by default.
• | Enabled validated constraint specifies that all old and new data also complies with the constraint. An enabled validated constraint guarantees that all data is and will continue to be valid. |
• | Enabled novalidated constraint ensures that all new DML operations on the constrained data comply with the constraint. This clause does not ensure that existing data in the table complies with the constraint and therefore does not require a table lock. |
• | Disabled validated constraint disables the constraint and drops the index on the constraint, but keeps the constraint valid. This feature is most useful in data warehousing situations, because it lets you load large amounts of data while also saving space by not having an index. |
• | Disabled novalidated constraint signifies that Oracle makes no effort to maintain the constraint (because it is disabled) and cannot guarantee that the constraint is true (because it is not being validated). |
Defferable
The option indicates whether or not, in subsequent transactions, constraint checking can be deferred until the end of the transaction using the SET CONSTRAINT(S) statement.
Deffered
Check the option to indicate that Oracle should check this constraint at the end of subsequent transactions. Otherwise Oracle should check this constraint at the end of each subsequent SQL statement.