mysql全连接

Oracle数据库支持full join,mysql是不支持full join的,但仍然可以同过左外连接+ union+右外连接实现

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

表b

表a

全连接后:

原文地址:https://www.csdn.net/gather_21/MtTaMgxsMDQxMC1ibG9n.html
posted @ 2019-07-25 15:46  星朝  阅读(19868)  评论(1编辑  收藏  举报