关于sql:在MySQL中执行FULL OUTER JOIN查询时出错

Error when executing a FULL OUTER JOIN query in MySQL

本问题已经有最佳答案,请猛点这里访问。

您好,我正试图在mysql中执行查询,但出现以下错误

查询:

1
 SELECT * FROM user_registration FULL OUTER JOIN user_details ON user_registration.email = user_details.gmail

错误是:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OUTER JOIN dreams ON user_registration.email = user_details.gmail LIMIT 0, 25' at line 1


如有好的full outer join在MySQL的,你可以使用leftrightouter joins与union: </P >

1
2
3
select * from user_registration ur left join user_details ud on ur.email = ud.gmail
union
select * from user_registration ur right join user_details ud on ur.email = ud.gmail