时间:2021-07-01 10:21:17 帮助过:2人阅读
SELECT <select_list> FROM TableA A LEFT JOIN TableB B ON A.Key = B.Key
SELECT <select_list> FROM TableA A LEFT JOIN TableB B ON A.Key = B.Key WHERE B.Key IS NULL
SELECT <select_list> FROM TableA A RIGHT JOIN TableB B ON A.Key = B.Key
SELECT <select_list> FROM TableA A RIGHT JOIN TableB B ON A.Key = B.Key WHERE A.Key IS NULL
mysql不支持,需要用union
SELECT <select_list> FROM TableA A FULL OUTER JOIN TableB B ON A.Key = B.Key
SELECT <select_list> FROM TableA A FULL OUTER JOIN TableB B ON A.Key = B.Key WHERE A.Key IS NULL OR B.Key IS NULL
Mysql七种 JOIN 连接
标签:list 内连接 out inner height width 右外连接 nio mys