Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help
Hi,
> Can someone explain "Inner Join" and "Outer Join"?
> <p>Thanks in advance
suppose 2 Tables tab1 and tab2, each with one column ct1/ct2
Tab1 Tab2
ct1 ct2
a
b b c c d d e
An inner join:
select ct1,ct2 from tab1,tab2 where tab1=tab2
results in
ct1 ct2
A left outer join:
select ct1,ct2 from tab1,tab2 where ct1=ct2(+);
results in
Ct1 Ct2
The (+) stand for pairs, where in tab1 is a value, but none in tab2.
A right outer join is vice versa.
In DB2 (not in Oracle, I suppose) you also have an FULL OUTER JOIN, which would result in
Ct1 Ct2
Hope that helps
Bye
Thomas
-- Thomas Schwickert Phone: +49 69 - 404 8661 Neckermann Versand AG Fax: +49 69 - 404 5561 60386 Frankfurt Germany Sent via Deja.com http://www.deja.com/ Before you buy.Received on Tue May 30 2000 - 00:00:00 CDT