The ANSI standard defines a list of constraints that can be placed on a table or index. Constraints following the definition of a column apply to that column; those standing alone as table constraints can reference any one or more columns in the table.
At this time, Micro Focus XDBC supports only the NOT NULL constraint. The complete list of possible constraints are:
|NOT NULL||Forbids NULLs from being entered in a column. According to ANSI standard, this specification can be only a column constraint|
|UNIQUE||Mandates that every column value, or combination of column values if a table constraint, be unique|
|PRIMARY KEY||Same effect as UNIQUE, except that none of the columns in a PRIMARY KEY constraint can contain NULLs. You can issue this constraint only once in a given table|
|CHECK||Followed by a predicate (in parentheses) that uses column values in some expression whose value can be TRUE, FALSE, or in the presence of NULLs, UNKNOWN. The constraint is violated only when the predicate is FALSE|
You can define constraints so that they are not checked until the end of the current transaction. This approach is useful when you want to update a table that references itself as a parent key. This operation usually creates intermediate states where referential integrity must be violated. By default, constraints are not deferrable.