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: Jonathan Gennick <listmail_at_gennick.com>
Date: Fri, 23 Aug 2002 11:38:42 -0800
Message-ID: <F001.004BE943.20020823113842@fatcity.com>


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).
Received on Fri Aug 23 2002 - 14:38:42 CDT

Original text of this message

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