Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Would be really nice if...
<fitzjarrell_at_cox.net> wrote in message
news:1109198682.845901.304060_at_o13g2000cwo.googlegroups.com...
>
> 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!!!!
>>
>> ;)
>
> How would that be useful? Given the following table:
>
> create inventory(unit_no number,
> unit_desc varchar2(40),
> unit_price number(9,2),
> unit_location varchar2(4),
> qty_on_hand number);
>
> your query, as you would wish, would be:
>
> select * except unit_no, unit_price from inventory;
>
> Which isn't much different from:
>
> select unit_desc, unit_location, qty_on_hand from inventory;
>
> Not much difference in what is typed, in terms of number of characters.
> So why have such a 'feature'? Yes, if one column is being eliminated
> from a result set that COULD be considered convenient, however I still
> wouldn't call convenience usefulness. And it isn't really saving
> keystrokes.
>
> Possibly someone could explain how this would be beneficial as the
> fundamental concept of this request escapes me.
>
>
> David Fitzjarrell
>
the feature may possibly be useful in a GUI, but not in the database
especially since good programming practice argues (IMO) against the use of 'SELECT *' ++ mcs Received on Wed Feb 23 2005 - 17:04:05 CST