mysql—— MySQL 的七种 join

转自: https://www.cnblogs.com/dinglinyong/p/6656315.html

inner join --> 内连接 

left join --> 左外连接

right join --> 右外连接

left join ... where b.id is null --> 左连接

right join ... where a.id is null --> 右连接

union --> 全连接

... where b.id is null union ...where a.id is null --> 两表都未出现的数据

 

posted @ 2019-02-16 09:51  JAYWX  阅读(93)  评论(0编辑  收藏  举报