测试表
a
b
左查询左边为主 左全部要出 右边有的匹配上没有的全部补NULL
select a.*,b.* from a left join b on a.hot = b.hot;
select a.*,b.* from b left join a on a.hot = b.hot;
右查询右边为主,右边全部出,左边没有的全部补NULL
select a.*,b.* from a right join b on a.hot = b.hot;
select a.*,b.* from b right join a on a.hot = b.hot;
内查询左右两边 = 号匹配的出
select a.*,b.* from a inner join b on a.hot = b.hot;
select a.*,b.* from b inner join a on a.hot = b.hot;