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;

 

posted @ 2019-04-22 16:40  caotao0918  阅读(759)  评论(0编辑  收藏  举报