Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: [Fwd: Re: Quick question re outer joins]
Friday, July 23, 2004, 11:22:11 AM, Nuno Souto (dbvision_at_optusnet.com.au) wrote:
NS> Which one is this one? Left or Right? Can never figure this out...
I tend to think the terms left and right were unfortunate choices. They represent the same operation. The directionality indicates which table is the "anchor table" (my term). So:
FROM a LEFT OUTER JOIN b
is precisely the same as:
FROM b RIGHT OUTER JOIN a
is the same as:
FROM a,b
WHERE a.id = b.id(+)
In all these cases, table a is what you would call the "master table". All rows from table a will be returned. Rows from table b will be included when corresponding rows exist.
Best regards,
Jonathan Gennick --- Brighten the corner where you are http://Gennick.com * 906.387.1698 * mailto:jonathan@gennick.com
Join the Oracle-article list and receive one article on Oracle technologies per month by email. To join, visit http://five.pairlist.net/mailman/listinfo/oracle-article, or send email to Oracle-article-request_at_gennick.com and include the word "subscribe" in either the subject or body.