Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Left outer join
I realise that this has probably been done to death but I am having
trouble with my outer join statement. It doesn't return more rows
that that of an equal join.
Here's a simple test I set up:
Table AR1
select * from ar1
ACCOUNT 100 999
Table AR2
select * from ar2;
ACCOUNT ATTVALUE ATT
100 A COSTC C1 999 A PROJECT 40
Outer Join Statement
select *
from ar1 ac, ar2 cc
where ac.account = cc.account(+)
and cc.att= 'C1';
ACCOUNT ACCOUNT ATTVALUE ATT
100 100 A COSTC C1
My understanding is that it should return all the rows from the first
table in this example ar1 and null values where there aren't a
matching. so some thing like this:
ACCOUNT ACCOUNT ATTVALUE ATT
100 100 A COSTC C1 999 NULL NULL NULL
Any help greatly appreciated.
Thanks
Andy
Received on Wed Nov 12 2003 - 10:25:39 CST
![]() |
![]() |