views:

364

answers:

1

How to rewrite this:

select tab1.id, tab2.id, tab3.id 
from tab1, tab2, tab3 
where tab1.col1 = tab2.col1(+) and tab2.col2 = tab3.col2(+);

using OUTER JOIN syntax?

+6  A: 
select tab1.id, tab2.id, tab3.id 
from tab1
left outer join tab2 on tab1.col1 = tab2.col1
left outer join tab3 on tab2.col2 = tab3.col2;
Tony Andrews
Thanks, I was not able to find such example in Oracle's SQL Reference :)
Igor Drincic