Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> alter table modify (column_name default ....) question

alter table modify (column_name default ....) question

From: Maurice Samuels <samuels_at_red.seas.upenn.edu>
Date: Tue, 14 Jan 2003 20:07:37 +0000 (UTC)
Message-ID: <b01qm9$cpv7$1@netnews.upenn.edu>


hi,
i have a table that i am adding a new column to and i want to initialize the column to have a value. here's what i've done:
alter table TEST_TABLE add (NEW_COLUMN varchar2(50) default 'INITIAL VALUE');

this runs fine but how do i take off the default value after the column has been added? i've tried:
alter table TEST_TABLE modify (NEW_COLUMN default null); but when i look in user_tab_columns (under the data_default column), the word NULL appears. when i insert a new row (and leave out a value for the new column) the value for NEW_COLUMN is null (and that is fine and the expected behavior) but i'm just wondering why the word NULL is in user_tab_columns when it should be blank like for other columns without defaults. the version of oracle i am using is 8.1.7.2.0. thanks in advance,
-maurice
samuels_at_seas.upenn.edu Received on Tue Jan 14 2003 - 14:07:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US