SQLite 只有 INNER 和 LEFT JOIN.
SQLite only has INNER and LEFT JOIN.
有没有办法对 SQLite 进行完全外部联接?
Is there a way to do a FULL OUTER JOIN with SQLite?
是的,请参阅 维基百科.
SELECT employee.*, department.*
FROM employee
LEFT JOIN department
ON employee.DepartmentID = department.DepartmentID
UNION ALL
SELECT employee.*, department.*
FROM department
LEFT JOIN employee
ON employee.DepartmentID = department.DepartmentID
WHERE employee.DepartmentID IS NULL
这篇关于使用 SQLite 进行完全外部联接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!