转自: 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 --> 两表都未出现的数据