oracle 连接加号(+)的使用方法

假设有

a表
id
1
2
3
4

b表
id
1
2
3

希望出来结果

a.id    b.id
1         1
2         2
3         3
4

用left join 的SQL code

    select a.id,b.id
    form a left jion b on a.id=b.id


用(+)的SQL code

    select a.id,b.id
    form a ,b
    where a.id=b.id(+)

用(+)的语法简洁,容易读懂,但只是ORACLE支持,LEFT JOIN是通用的,其它没有差别

猜你喜欢

转载自guyuetianc-163-com.iteye.com/blog/1681571