Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: OUTER JOIN
In article <6as6sa$dr0$1_at_news.iconz.co.nz> "Pat" <smartinp_at_iconz.co.nz> writes:
>From: "Pat" <smartinp_at_iconz.co.nz>
>Subject: Re: OUTE JOIN
>Date: Fri, 30 Jan 1998 22:35:00 -0800
>Bernd.
>Ansi SQL for outer join is:
>(LEFT OUTER JOIN / RIGHT OUTER JOIN / FULL OUTER JOIN) ON . .. .
>eg:
>select empno, vehicleno from vehicle LEFT JOIN employee ON
>(vehicle.vehicleno = employee.vehicleno)
>which will preserve unmatched rows from the first table.
Which would be great if Oracle (pre 8 ... don't know whether 8 changes things) supported that syntax. Trouble is, it doesn't.
You have to use a "(+)" to indicate a left outer join, eg:
select empno, vehicleno from vehicle, employee where vehicle.vehicleno = employee.vehicleno (+)
I assume this will also work in 8.x, since a lot of existing Oracle apps would be broken, otherwise ...
Rick Brown
rick_at_onramp.net
Received on Fri Jan 30 1998 - 00:00:00 CST