Oracle 左连接、右连接、全外连接、(+)号作用

左外连接(Left outer join/ left join)
select * from a left join b on a.id = b.id;
select * from a,b where a.id = b.id(+);
用(+)来实现,这个+号可以这样来理解: + 表示补充,即哪个表有加号,这个表就是匹配表。所以加号写在右表,左表就是全部显示,故是左连接。
右外连接(right outer join/ right join)
select * from a right join b on a.id = b.id;
select * from a,b where a.id(+)=b.id;
用(+)来实现,这个+号可以这样来理解: + 表示补充,即哪个表有加号,这个表就是匹配表。所以加号写在左表,右表就是全部显示,故是右连接。

原文地址:https://www.cnblogs.com/changxr/p/7306028.html