gpt4 book ai didi

mysql - 错误 : FULL JOIN is only supported with merge-joinable join conditions

转载 作者:行者123 更新时间:2023-11-29 00:19:26 24 4
gpt4 key购买 nike

当我尝试使用内部连接连接表时..它返回数据..但是当我使用完全外部连接连接 4 个表时我说

ERROR: FULL JOIN is only supported with merge-joinable join conditions"

查询示例:

SELECT hr_employee.name,hr_movement.amount,hr_concept.name,hr_period.name
FROM hr_employee
FULL OUTER JOIN hr_movement
ON hr_employee.ad_client_id=hr_movement.ad_client_id
FULL OUTER JOIN hr_concept
ON hr_movement.ad_client_id=hr_employee.ad_client_id
FULL OUTER JOIN hr_period
ON hr_concept.ad_client_id=hr_employee.ad_client_id

最佳答案

SELECT hr_employee.name,hr_movement.amount,hr_concept.name,hr_period.name
FROM hr_employee
FULL OUTER JOIN hr_movement
ON hr_employee.ad_client_id=hr_movement.ad_client_id
FULL OUTER JOIN hr_concept
ON hr_movement.ad_client_id=hr_employee.ad_client_id /*<- here*/
FULL OUTER JOIN hr_period
ON hr_concept.ad_client_id=hr_employee.ad_client_id /*<- and here*/

您正在连接表,但不要在连接条件中使用这些表。除此之外,MySQL 不支持FULL OUTER JOINs。它们像在 this answer 中一样实现.

关于mysql - 错误 : FULL JOIN is only supported with merge-joinable join conditions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21642704/

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