MySQL不支持 full outer join,如何做全连接(企业版可支持)

select s.camp_id,s.camp_name,k.read_flag from sony_push s full outer join `sony_push detail` k on s.camp_id=k.camp_id;

报错:

select s.camp_id,s.camp_name,k.read_flag from sony_push s full outer join `sony_push detail` k on s.camp_id=k.camp_id
> 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 'full outer join `sony_push detail` k on s.camp_id=k.camp_id' at line 1
> 时间: 0s

普通的MySQL看来是不支持full outer join的了,可以这么处理:

select s.camp_id,s.camp_name,k.read_flag from sony_push s left join `sony_push detail` k on s.camp_id=k.camp_id union select s.camp_id,s.camp_name,k.read_flag from sony_push s right join `sony_push detail` k on s.camp_id=k.camp_id;