Re: Not Null Column in a existing table....

From: fumi <fumi_at_tpts5.seed.net.tw>
Date: 18 Oct 1999 16:32:53 GMT
Message-ID: <7ufi3l$v$1_at_news.seed.net.tw>


Pankaj Joshi <pankaj_joshi_at_hotmail.com> wrote in message news:7u9oth$6h3$1_at_news.vsnl.net.in...
> Hi Folks,
> Can anyone guide me.....how to add a column with not null constraint in a
> populated table without affecting the data.
>
> Thanks in advance,

If you want to put a default value in the new column, you can do this, for example:

    alter table foo add new_column number default 0 not null;

If there is no default value, you can not put a "not null" constraint on the new column. Received on Mon Oct 18 1999 - 18:32:53 CEST

Original text of this message