mysql 实现全连接

mysql不支持全连接,但可以通过左外连接+ union+右外连接实现


SELECT * FROM t1
LEFT JOIN t2 ON t1.id = t2.id
UNION
SELECT * FROM t1
RIGHT JOIN t2 ON t1.id = t2.id

posted @ 2020-12-11 08:20  东骧神骏  阅读(1508)  评论(0编辑  收藏  举报