Re: [SQL] adding column with not null constraint

2002-10-20 Thread Johannes Lochmann
On Fri, 2002-10-18 at 22:12, Vivek Khera wrote: > ALTER TABLE msg_owner ADD COLUMN user_optional_fields VARCHAR(255); > ALTER TABLE msg_owner ALTER user_optional_fields SET DEFAULT ''; > UPDATE msg_owner SET user_optional_fields = ''; > > Now my problem is I cannot find any syntax for ALTER TABLE

[SQL] adding column with not null constraint

2002-10-18 Thread Vivek Khera
I'm looking to add a column to my database with not null and a default value: vk=> alter table msg_owner add column user_optional_fields varchar(255) NOT NULL default ''; ERROR: Adding columns with defaults is not implemented. Add the column, then use ALTER TABLE SET DEFAULT. vk=> alter