原创 2017年01月11日 13:33:42

select * from a,b where a.id=b.id(+);      

(+)写在where后面,不能与or/in连用,

b表是附属表

---------------------------------------------------------------------------

select * from a left join b on a.id=b.id;  

左连接   写在 from 与where之间

a left join b  on a.id=b.id    主表 left join 附表  on 连接条件

---------------------------------------------------------------------------

 

效率上没区别

left join 可读性高、功能更全面、通用性强、而且是新标准

建议使用left join

 

详细查看

http://blog.chinaunix.net/uid-21187846-id-3288525.html

相关文章:

  • 2022-12-23
  • 2021-05-18
  • 2021-10-05
  • 2022-01-22
  • 2021-11-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-07-04
相关资源
相似解决方案