mysql不支持full join的另一种解决办法 和根据多个表中的相同分组来连接查询
因为MySQL不支持FULL JOIN,下面是替代方法
left join + union(可去除重复数据)+ right join
两张表时:
select * from A left join B on A.id = B.id (where 条件) union select * from A right join B on A.id = B.id (where条件);
因为MySQL不支持FULL JOIN,下面是替代方法
left join + union(可去除重复数据)+ right join
两张表时:
select * from A left join B on A.id = B.id (where 条件) union select * from A right join B on A.id = B.id (where条件);