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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: how to get rid of default

Re: how to get rid of default

From: Vladimir Begun <Vladimir.Begun_at_oracle.com>
Date: Thu, 30 Oct 2003 10:19:32 -0800
Message-ID: <F001.005D5181.20031030101932@fatcity.com>


Olga Gurevich wrote:
> I have created a field in a table with a default
> clause. - f1 number(1) not null default 1. How can I
> get rid of the default now?

Oracle9i SQL Reference
Release 2 (9.2)
ALTER TABLE
column_clauses
add_column_clause

"If a column has a default value, then you can use the DEFAULT clause to change the default to NULL, but you cannot remove the default value completely. That is, if a column has ever had a default value assigned to it, then the DATA_DEFAULT column of the USER_TAB_COLUMNS data dictionary view will always display either a default value or NULL."

ALTER TABLE tbl MODIFY f1 DEFAULT NULL;

-- 
Vladimir Begun
The statements and opinions expressed here are my own and
do not necessarily represent those of Oracle Corporation.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Vladimir Begun
  INET: Vladimir.Begun_at_oracle.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Oct 30 2003 - 12:19:32 CST

Original text of this message

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