跳转至

Join


交叉连接 CROSS JOIN

SELECT * FROM 1 CROSS JOIN 2;

内连接 INNER JOIN

找到所有满足连接谓词的行的匹配对

SELECT * FROM 1 INNER JOIN 2 ON 1.字段 = 2.字段;

外连接 OUTER JOIN

未匹配的值会用NULL代替

SELECT * FROM 1 LEFT OUTER JOIN 2 ON 1.字段 = 2.字段;