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: <fitzjarrell_at_cox.net>
Date: 23 Feb 2005 16:52:28 -0800
Message-ID: <1109206348.009651.318990@z14g2000cwz.googlegroups.com>

Mark C. Stock wrote:
> <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

I agree entirely. Daniel has already illustrated a point to ponder, namely DDL against the table adding/modifying/dropping columns. 'Select *' should break, or the application code receiving the resultset from 'select *' should cause something to break. I hate to say this, but the request screams laziness on the part of the programmer. Why should Oracle reward such laziness?

It's a mystery.

David Fitzjarrell Received on Wed Feb 23 2005 - 18:52:28 CST

Original text of this message

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