Re: Removing a default value




"Jens Lenge" <spampot@xxxxxxx> a écrit dans le message de news: 1156873876.870883.98560@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| Michel Cadot wrote:
|
| > 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.
|
| At least Oracle SQL Developer seems to spot a difference:
| Columns with no default value are displayed with an empty field in the
| "Data Default" column, while columns that have explicitly been set (or
| modified) to "default null" are displayed with "null". Also, the
| automatically created DDL sequence for the respective table contains
| "DEFAULT NULL" in the latter case while it has no default statement at
| all in the first case.
|
| That's why I suspected that Oracle does make a difference between "no
| default" and "default to null". Or is it just a bug of SQL Developer?
|
| Jens
|

It's not a bug.
The difference is due to Oracle dictionary.
When there is no default then default value is null in the dictionary.
When it set to "null" then dictionary contains the string "null"
which is not the same as a default value equals to the string 'null'.
In this case the dictionary contains the string "'null'" (without the "
but with the ').
But there is no *functional* difference between nothing the default
value or a default of "null" (without any king of quote).

Regards
Michel Cadot


.



Relevant Pages

  • Re: Full outer joins and version 9.2.x
    ... | We cannot dictate to a large company when to update their oracle ... So live with the bug. ... Michel Cadot ...
    (comp.databases.oracle.misc)
  • Re: SQL statements
    ... | Can anyone explain why when I run the first statement in Oracle XE I ... '18-jun-07' is not a date it is a string. ... Michel Cadot ...
    (comp.databases.oracle.misc)
  • Warning: Do not use DISM on Solaris 8 or Solaris 9 pre-update 2
    ... The infodoc goes on to recommend that DISM not ... be used at all with Solaris 8, or Solaris 9 prior to update 2. ... this bug since it can be such a silent performance killer. ... If you see ora_dism_then Oracle 9i is making use of DISM ...
    (SunManagers)
  • Re: Query Oracle from Excel
    ... You will need the Oracle client sofware installed on the PC you're running ... What exactly is DBDataProvider and DBDataSource? ... Global prmUsername As String ... Dim adoConn As New ADODB.Connection ...
    (microsoft.public.excel.programming)
  • Re: BUG or FEATURE
    ... 10x two all for replay. ... work better/easier will be a feature and not bug. ... goes to oracle. ...
    (comp.software.testing)