天天看點

mysql 不支援 full [outer] join 的解決方式

2.  錯誤
select * from a full outer join  b on  a.name = b.name
 > 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'outer join  b on  a.name = b.name' at line 13. 解決方式:
left  join  + union (去除重複資料) + right  join 
# 全連接配接
 select * from a left join b on a.name = b.name 
 union 
 select * from a right join b on a.name = b.name