SELECT * FROM Table1 t1 FULL OUTER JOIN Table2 t2 ON t1.Col1 = t2.Col1
FULL OUTER JOIN – WHERE NULL:
返回内连接以外的数据行,即匹配列坐在行以外的所有数据。
SELECT * FROM Table1 t1 FULL OUTER JOIN Table2 t2 ON t1.ID = t2.ID WHERE t1.ID IS NULL OR t2.ID IS NULL
CROSS JOIN:
交叉连接不需要任何连接条件。这个会把两个表的的数据进行笛卡尔积操作。
SELECT * FROM Table1 t1 CROSS JOIN Table2 t2