Subject Re: [firebird-support] Re: Possible bug with CHECK constraint
Author Daniel Rail
Hi,

At October 8, 2004, 11:50, Roman Rokytskyy wrote:



>> 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.

The standard does say that you can use them, but it is not required to
be SQL-Standard compliant. It is part of the optional integrity
features of the standard, more specifically feature F671. The only
thing written in regards to F671 is basically: if feature F671 is not
implemented then CHECK CONSTRAINT cannot use subqueries.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)