Return-Path: <ml-errors@fatcity.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id h78AeoI14565
 for <oracle-l@orafaq.net>; Fri, 8 Aug 2003 05:40:50 -0500
X-ClientAddr: 66.27.56.213
Received: from www2.fatcity.com (rrcs-west-66-27-56-213.biz.rr.com [66.27.56.213])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id h78Aeop14560
 for <oracle-l@orafaq.net>; Fri, 8 Aug 2003 05:40:50 -0500
Received: (from root@localhost)
 by www2.fatcity.com (8.11.6/8.11.6) id h788HIV01760
 for oracle-l@orafaq.net; Fri, 8 Aug 2003 01:17:18 -0700
Received: by fatcity.com (05-Jun-2003/v1.0g-b73/bab) via fatcity.com id 005C9917; Fri, 08 Aug 2003 01:09:23 -0800
Message-ID: <F001.005C9917.20030808010923@fatcity.com>
Date: Fri, 08 Aug 2003 01:09:23 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Pardee, Roy E" <roy.e.pardee@lmco.com>
Sender: ml-errors@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Pardee, Roy E" <roy.e.pardee@lmco.com>
Subject: RE: last column in a table is added with a DEFAULT
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 73; ListGuru (c) 1996-2003 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

It is impossible to add a NOT NULL column that *doesn't* have a DEFAULT to a table (unless the table is empty).  The error you get is "ORA-01758: table must be empty to add mandatory (NOT NULL) column".

But that's a logical problem, not a bug.  Is there any chance the dev is confusing this problem with something else?

Cheers,

-Roy

Roy Pardee
Programmer/Analyst/DBA
SWFPAC Lockheed Martin IT
Extension 8487 
-----Original Message-----
Sent: Thursday, August 07, 2003 12:30 PM
To: Multiple recipients of list ORACLE-L


See the test below:

YPD_OWNER@rex-SQL> create table t1 (c1 number);
 
Table created.
 
YPD_OWNER@rex-SQL> insert into t1 (c1) values (1);
 
1 row created.
 
YPD_OWNER@rex-SQL> insert into t1 (c1) values (2);
 
1 row created.

YPD_OWNER@rex-SQL> commit;
 
Commit complete.
 
YPD_OWNER@rex-SQL> select * from t1;
 
        C1
----------
         1
         2
 
YPD_OWNER@rex-SQL> alter table t1 add (c2 number default 999);
 
Table altered.
 
YPD_OWNER@rex-SQL> select * from t1;
 
        C1         C2
---------- ----------
         1        999
         2        999

 
-----Original Message-----
Sent: Thursday, August 07, 2003 3:09 PM
To: Multiple recipients of list ORACLE-L


I understand that part.  What the programmer is saying that you can not add the last column to a table with a default value.  Does that sound reasonable?
thanks, Raj.
David.
-----Original Message-----
Sent: Thursday, August 07, 2003 1:25 PM
To: Multiple recipients of list ORACLE-L


as soon as you add a column all depending code goes invalid, the dependency checking process doesn't discriminate about the default value.
Raj 
-------------------------------------------------------------------------------- 
Rajendra dot Jamadagni at nospamespn dot com 
All Views expressed in this email are strictly personal. 
QOTD: Any clod can have facts, having an opinion is an art ! 


-----Original Message----- 
Sent: Thursday, August 07, 2003 1:09 PM 
To: Multiple recipients of list ORACLE-L 


Has anybody ever heard of this?  I have a developer saying this is an oracle 
bug.  It caused some packages to go invalid. 


"The error seems to be related to a bug in oracle caused when the last 
column in a table is added with a default." 
David Ehresmann  
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net 
-- 
Author: Ehresmann, David 
  INET: David.Ehresmann@ps.net 
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@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). 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Pardee, Roy E
  INET: roy.e.pardee@lmco.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@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).

