Subject Re: [firebird-support] Possible bug with CHECK constraint
Author Ann W. Harrison
At 11:40 AM 10/4/2004, Ivan Prenosil wrote:

> > CREATE TABLE test_master (
> > id INTEGER NOT NULL PRIMARY KEY,
> > CHECK(COALESCE((SELECT max(id) FROM test_master), 0) < 10)
>
>So, even if Firebird supported sql92 standard, would that solve
>the problem ?

If that constraint were evaluated after the record was stored,
it would work as expected. And, of course, be really expensive
compared to the simple "id < 10" test that we would normally
use.

Regards,


Ann