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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Article on using aliases in SELECT statements

Re: Article on using aliases in SELECT statements

From: <Jared.Still_at_radisys.com>
Date: Fri, 23 Aug 2002 13:04:24 -0800
Message-ID: <F001.004BEC61.20020823130424@fatcity.com>


My guess is that the parse code treats it the same as if there were no aliases.

Same problems as not using aliases.

I must emphasize that this is just a SWAG, as I don't really have time to test this guess.

Also, aliases are *required* for using Oracle OO objects in SQL, and have been since 8.0.

Jared

Jonathan Gennick <listmail_at_gennick.com>
Sent by: root_at_fatcity.com
08/23/2002 12:38 PM
Please respond to ORACLE-L  

        To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
        cc: 
        Subject:        Re: Article on using aliases in SELECT statements


Thanks Jared. You know, Cary Milsap read my article and pointed out to me that you can use the same alias for more than one table in a query:

SQL> select a.thing1, a.thing2
  2 from table1 a, table2 a;

    THING1 THING2
---------- ----------

         1 2

I must say, I would never have even thought to try the above. I wonder why it's even allowed. Any ideas? Oh well, it's Friday, and I'm rushing to get things done so I can get out the door. Maybe it'll all become clear to me on Monday.

Jonathan Gennick --- Brighten the corner where you are mailto:jonathan_at_gennick.com * 906.387.1698 http://Gennick.com * http://MichiganWaterfalls.com * http://ValleySpur.com

On Fri, 23 Aug 2002 09:43:25 -0800, you wrote:

>Interesting stuff Jonathan.
>
>Hope the CEO has forgiven you by now. :)
>
>Seems that I've read that 'building SQL incrementally' in the past.
>
>I nearly always start with the FROM, then go to the WHERE, using a
>SELECT COUNT(*) to get these working, then fill in the the columns
>needed, always using table aliases of course.
>
>Jared

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jonathan Gennick
  INET: listmail_at_gennick.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_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.com
-- 
Author: 
  INET: Jared.Still_at_radisys.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_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).
Received on Fri Aug 23 2002 - 16:04:24 CDT

Original text of this message

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