Subject | default value |
---|---|
Author | Nick Upson |
Post date | 2006-12-20T13:07:04Z |
if I do this (there is 1 row already in the table)
ALTER TABLE mytable add test Integer DEFAULT 0 NOT NULL;
commit;
when I do
select * from mytable where test = 0;
I would expect zero rows and when I do
select * from mytable where test is null;
I would expect 1 row
yet it's the other way round, test contains 0, I remember a frequent
problem with people adding a column, not running an update and then
finding their backup would not restore. what is happening, have I
slipped from a parallel universe?
(fb1.5.3 cs on fedora 5)
ALTER TABLE mytable add test Integer DEFAULT 0 NOT NULL;
commit;
when I do
select * from mytable where test = 0;
I would expect zero rows and when I do
select * from mytable where test is null;
I would expect 1 row
yet it's the other way round, test contains 0, I remember a frequent
problem with people adding a column, not running an update and then
finding their backup would not restore. what is happening, have I
slipped from a parallel universe?
(fb1.5.3 cs on fedora 5)