一、左连接
SELECT * FROM A LEFT JOIN B ON A.KEY = B.KEY
二、右连接
SELECT * FROM A RIGHT JOIN B ON A.KEY = B.KEY
三、内连接
SELECT * FROM A INNER JOIN B ON A.KEY = B.KEY
四、全连接
1 SELECT * FROM A FULL OUTER JOIN B ON A.KEY = B.KEY
2 SELECT * FROM A LEFT JOIN B ON A.KEY=B.KEY
UNION
SELECT * FROM A RIGHT JOIN B ON A.KEY=B.KEY
五、左外连接
SELECT * FROM A LEFT JOIN B ON A.KEY = B.KEY WHERE B.KEY IS NULL
六、右外连接
SELECT * FROM A RIGHT JOIN B ON A.KEY = B.KEY WHERE A.KEY IS NULL
七、全外连接
1 SELECT * FROM A FULL OUTER JOIN B ON A.KEY = B.KEY WHERE A.KEY IS NULL OR B.KEY IS NULL
2 SELECT * FROM A LEFT JOIN B ON A.KEY=B.KEY WHERE B.KEY IS NULL
UNION
SELECT * FROM A RIGHT JOIN B ON A.KEY=B.KEY WHERE A.KEY IS NULL