mysql 全连接 报错1051的原因

由于mysql 不支持 直接写full outer join 或者 full join来表示全外连接但是可以用left right union right 代替

下面是例子:

select * from table a A(A为别名)LEFT JOIN table b B on A.id=B.id
union
select * from table a A RIGHT JOIN table b B on A.id=B.id;

猜你喜欢

转载自www.cnblogs.com/caotao0918/p/10751016.html