> This is a limitation of SQLite's current ALTER TABLE implementation. Columns 
> can only be added with a default value of NULL, therefore NOT NULL columns 
> are forbidden. 

I don't think so because this works (shortened here; it also works with 
REFERENCES...):

ALTER TABLE test ADD COLUMN groupid2 INTEGER NOT NULL DEFAULT 1;

I guess a missing DEFAULT automatically implies DEFAULT NULL, so the behavior 
of ALTER should be correct whilst CREATE seems to forget to reject the 
statement.

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to