Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Article on using aliases in SELECT statements
Jonathan,
Would you most likely use the same alias when you are doing a self
join on a table?
That is about the most likely place I can think of.
Ron
ROR mª¿ªm
>>> listmail_at_gennick.com 08/23/02 03:38PM >>>
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: Ron Rogers INET: RROGERS_at_galottery.org 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 - 15:03:34 CDT
![]() |
![]() |