Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Would be really nice if...
"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; Received on Wed Feb 23 2005 - 19:25:49 CST