gpt4 book ai didi

sql - 使用 SQLite 的完全外部连接

转载 作者:IT王子 更新时间:2023-10-29 06:17:00 24 4
gpt4 key购买 nike

SQLite 只有 INNER 和 LEFT JOIN。

有没有办法用 SQLite 进行 FULL OUTER JOIN?

最佳答案

是的,请参阅 Wikipedia 上的示例.

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

关于sql - 使用 SQLite 的完全外部连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1923259/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com