代码之家  ›  专栏  ›  技术社区  ›  Igor Drincic

Oracle联接运算符

  •  2
  • Igor Drincic  · 技术社区  · 17 年前

    如何重写:

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

    使用外部联接语法?

    1 回复  |  直到 17 年前
        1
  •  8
  •   Tony Andrews    17 年前
    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;