Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: outer join
On Tue, 25 Feb 1997 11:17:43 +0100, Michiel Perdeck <perdeck.via_at_sni.de> wrote:
>Can anyone explain to me in a few sentences where exactly to place the
>(+) of an outer join in Oracle?
Does Oracle support Subselect and "(NOT) EXISTS"? Then better use this.
>SELECT m.main.id, s.text
>FROM MAIN m, SUBTABLE s
>WHERE m.sub_id = s.sub_id
>
>But this will only show those records where m.sub_id is not NULL.
SELECT m.main.id, s.text
FROM MAIN m, SUBTABLE s
WHERE NOT EXISTS (SELECT * FROM MAIN x where x.sub_id = s.sub_id)
Received on Fri Feb 28 1997 - 00:00:00 CST