Subject Re: Possible bug with CHECK constraint
Author Roman Rokytskyy
> I will check DB2 tomorrow.

Here is what actually written SQL99:

" A table check constraint is described by a table check constraint
descriptor. In addition to the components of every table constraint
descriptor, a table check constraint descriptor includes:
— The <search condition>.

A table check constraint is satisfied if and only if the specified
<search condition> is not false for any row of a table."

Though standard does not say that we cannot put subqueries into the
search condition.

And finally I have checked DB2. They simply do not allow subqueries in
CHECK constraints.

Roman