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

Home -> Community -> Usenet -> c.d.o.server -> Re: Would be really nice if...

Re: Would be really nice if...

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Thu, 24 Feb 2005 09:20:16 -0800
Message-ID: <1109265433.922604@yasure>


Haximus wrote:

> "DA Morgan" <damorgan_at_x.washington.edu> wrote in message 
> news:1109201461.566632_at_yasure...
> 

>>Haximus wrote:
>>
>>
>>>...if there was a select_list:: feature to do wildcard selects on
>>>columns, then EXCLUDE specified columns, e.g.:
>>>
>>>SELECT * EXCEPT UNIT_NO, ETC, ETC ...
>>>
>>>Oracle, will ya get on this right away!!!!
>>>
>>>;)
>>
>>Sounds like a desire for disaster to me. Consider the following:
>>
>>CREATE TABLE t (
>>col1 NUMBER,
>>col2 NUMBER,
>>col3 NUMBER);
>>
>>INSERT INTO t VALUES (1,1,1);
>>COMMIT;
>>
>>SELECT * FROM t EXCEPT col2;
>>
>>ALTER TABLE t
>>ADD (col4 NUMBER);
>>
>>SELECT * FROM t EXCEPT col2;
>>
>>That ought to break just about everything except SQL*Plus.
> 
> 
> Not sure I follow...
> 
> My suggestion would be to make it a select list option, not a clause
> 
> SELECT * EXCLUDING col2 FROM t;

You completely missed the point of the demo.

In one case two columns are returned ... in the other case three.

It doesn't matter whether you put your clause into the ORDER BY, were that possible, it still breaks everything.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Thu Feb 24 2005 - 11:20:16 CST

Original text of this message

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