MySQL中没有FULL OUTER JOIN的处理

FULL OUTER JOIN:
SELECT column_name(s)
FROM table1
FULL OUTER JOIN table2
ON table1.column_name=table2.column_name;

Mysql中可以使用UNION,同时联合LEFT JOIN 与RIGHT JOIN,如:

SELECT column_name(s) FROM table1 LEFT JOIN table2 ON table1.name = table2.name

UNION

SELECT column_name(s) FROM table1 RIGHT JOIN table2 ON table1.name =table2.name;

 

posted @ 2020-07-01 19:41  一步至遥  阅读(1673)  评论(0编辑  收藏  举报
TOP