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

Home -> Community -> Mailing Lists -> Oracle-L -> Remove default value from a column?

Remove default value from a column?

From: <Jared.Still_at_radisys.com>
Date: Thu, 16 May 2002 10:28:22 -0800
Message-ID: <F001.00462AA1.20020516102822@fatcity.com>


Does anyone know how to remove the default value from a column?

The following script illustrates:

set long 40

drop table i;
create table i ( i varchar2(10) null);
alter table i modify ( i default null );

select column_name, nullable, data_default from user_tab_columns
where table_name = 'I'
/

drop table i;
create table i ( i varchar2(10) null);

select column_name, nullable, data_default from dba_tab_columns
where table_name = 'I'
/

The string for the default value is not a constraint. It is stored in sys.col$.default$.

There doesn't seem to be any way to remove the default value for a column once it's set. I've peruse TFM quite a bit, did a google search: nothing helpful.

Jared

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Jared.Still_at_radisys.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu May 16 2002 - 13:28:22 CDT

Original text of this message

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