MySQL does not support full outer join, how to do full connection (enterprise version can support)
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;
Error:
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
Ordinary MySQL does not seem to support full outer join, it can be handled as follows:
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;