1. 程式人生 > >mysql 7 種 join

mysql 7 種 join

AS mys from null com union http nio where

一、

技術分享圖片

select * from A inner join B on A.key = B.key

二、

技術分享圖片

select * from A left join B on A.key = B.key

三、

技術分享圖片

select * from A right join B on A.key = B.key

四、

技術分享圖片

select * from A left join B on A.key = B.key where b.key is null

五、

技術分享圖片

select * from A right join B on A.key = B.key where A.key is null

六、

技術分享圖片

select * from A left join B on A.key = B.key
union
select * from A right join B on A.key = B.key

七、

技術分享圖片

select * from A left join B on A.key = B.key where B.key is null
union
select * from A right join B on A.key = B.key where A.key is null

mysql 7 種 join