DB2 Universal Database for iSeries SQL Reference

Check constraints

A check constraint is a rule that specifies which values allowed in every row of a base table. The definition of a check constraint contains a search condition that must not be FALSE for any row of the base table. Each column referenced in the search condition of a check constraint on a table T must identify a column of T. For more information on search conditions, see Search conditions.

A base table can have nore than one check constraint. Each check constraint defined on a base table is enforced by the database manager when either of the following occur:

A check constraint is enforced by applying its search condition to each row that is inserted or updated in that base table. An error is returned if the result of the search condition is FALSE for any row.

For more information on defining check constraints, see ALTER TABLE or CREATE TABLE.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]