Howdy!
I have a database with tables defined like this:
CREATE TABLE table1 (
id INTEGER PRIMARY KEY,
value REAL DEFAULT 1.0 CHECK (0.0 <= value)
);
CREATE TABLE table2 (
id INTEGER PRIMARY KEY,
value REAL DEFAULT 1.0 CHECK (0.0 <= value AND value <= 1.0)
);
The following statements should each fail with a constraint error:
UPDATE table1 SET value='NONESUCH' WHERE id=1;
UPDATE table2 SET value='NONESUCH' WHERE id=1;
For some reason, setting the value in table2 fails, as it should, but
setting the value in table1 succeeds when it shouldn't. If I change the
constraint in table1 so that it has an upper limit, the check fails.
Any ideas? Could it be doing a string comparison rather than a numeric
comparison in the first case?
Will
--
Will Duquette -- [email protected]
Athena Development Lead -- Jet Propulsion Laboratory
"It's amazing what you can do with the right tools."
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users