oracle 链接查询 + Mysql

oracle连接加号(+)的使用方法
 
假设有
a表
id
1
2
3
4
www.2cto.com  
b表
id
1
2
3
 
希望出来结果
 
a.id    b.id
1         1
2         2
3         3
4
用left join 的SQL code
  www.2cto.com  
    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是通用的,其它没有差别

猜你喜欢

转载自hai0378.iteye.com/blog/2222125