Subject | Possible bug with CHECK constraint |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-10-02T21:50:10Z |
CREATE DATABASE 'test.fdb' USER 'sysdba' PASSWORD 'masterkey';
CREATE TABLE test_master (
id INTEGER NOT NULL PRIMARY KEY,
CHECK(COALESCE((SELECT max(id) FROM test_master), 0) < 10)
);
COMMIT;
INSERT INTO test_master VALUES (1);
INSERT INTO test_master VALUES (20);
COMMIT;
This script succeeds. Is it normal?
Roman
CREATE TABLE test_master (
id INTEGER NOT NULL PRIMARY KEY,
CHECK(COALESCE((SELECT max(id) FROM test_master), 0) < 10)
);
COMMIT;
INSERT INTO test_master VALUES (1);
INSERT INTO test_master VALUES (20);
COMMIT;
This script succeeds. Is it normal?
Roman