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 -> Re: Removing a default value

Re: Removing a default value

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Tue, 29 Aug 2006 19:24:41 +0200
Message-ID: <44f4785b$0$29918$636a55ce@news.free.fr>

"Jens Lenge" <spampot_at_gmx.net> a écrit dans le message de news: 1156866293.180604.225250_at_i3g2000cwc.googlegroups.com...
| Hello world,
|
| what is the "official" way to remove an existing default value setting
| for a certain column in Oracle 9i and 10g? The modify column clauses
| according to
|
| http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#i2103956
|
| do not seem to allow a "no default" choice, while SQL Developer's
| automatic code generation simply sets the default to null, which is
| different to not setting a default in the first place (as it explicitly
| yields "default null" in the SQL code).
|
| Of course I can create a new column with no default, copy the existing
| values, and drop the original column, but I am pretty sure the is a
| more direct way. However, the "drop default" statement found in other
| SQL dialects is not support by Oracle, and I did not find an equivalent
| in Oracle's alter table docs.
|
| Jens
|

What is the difference between no default and default null? When there is no default and you don't give a value to a field then this field is null.
In Oracle, to remove a default value you set the default to null.

Regards
Michel Cadot Received on Tue Aug 29 2006 - 12:24:41 CDT

Original text of this message

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