Access / Jet数据库引擎不支持FULL OUTER JOIN
s:
SELECT Table1.*, Table2.*
FROM Table1
FULL OUTER JOIN Table2 ON Table1.JoinField = Table2.JoinField
通常建议的替代方法是UNION
LEFT
和RIGH JOIN
s的结果;以下内容有所不同:
SELECT Table1.*, Table2.*
FROM Table1
LEFT JOIN Table2 ON Table1.JoinField = Table2.JoinField
UNION ALL
SELECT Table1.*, Table2.*
FROM Table1
RIGHT JOIN Table2 ON Table1.JoinField = Table2.JoinField
WHERE Table1.JoinField IS NULL
但是,是否也可以使用交叉连接?
SELECT Table1.*, Table2.*
FROM Table1, Table2
WHERE Table1.JoinField = Table2.JoinField
OR Table1.JoinField IS NULL
OR Table2.JoinField IS NULL
以这种方式使用交叉联接是否有任何性能损失或其他缺点?