View Single Post
  #1  
Old July 2nd, 2005, 11:59 PM
Santiago
external usenet poster
 
Posts: n/a
Default "...ADD COLUMN...DEFAULT YES" leaves existing rows as FALSE?

Hi all,
I'm adding a new column via this statement:
ALTER TABLE myTable ADD COLUMN myColumn YESNO DEFAULT YES

And it works great except that existing rows have myColumn = FALSE even
though the default is TRUE (new rows behave correctly). I would expect that
existing rows would take on the default? Am I incorrect in my expectation or
is there something wrong in my SQL statement?

P.S.: If you were about to answer: Just use this statement:
UPDATE myTable SET myColumn = YES
save your breath I already have done that. The question above still
stands though.