【问题标题】:Oracle join operatorOracle 连接运算符
【发布时间】:2010-09-24 11:04:13
【问题描述】:

如何改写:

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

使用 OUTER JOIN 语法?

【问题讨论】:

    标签: sql oracle outer-join


    【解决方案1】:
    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;
    

    【讨论】:

    • 谢谢,我在 Oracle 的 SQL 参考中找不到这样的例子 :)
    猜你喜欢
    • 2011-12-04
    • 2017-06-24
    • 2010-09-21
    • 1970-01-01
    • 2017-03-29
    • 2010-11-25
    • 2012-01-20
    • 2013-03-15
    • 2011-01-03
    相关资源
    最近更新 更多