2008-11-28 48 views
2

如何重寫此:甲骨文攜手運營商

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

使用OUTER JOIN語法?

回答

8
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; 
+0

謝謝,我無法在Oracle的SQL參考中找到這樣的例子:) – 2008-11-28 14:33:25