gpt4 book ai didi

MySQL错误1054 : unknown column job_title

转载 作者:行者123 更新时间:2023-11-29 18:15:22 29 4
gpt4 key购买 nike

任何人都可以告诉我为什么会出现此错误:

error 1054 : Unknown column 'DEPARTMENT.department_name' in 'on clause'

我真的不明白为什么

这是我的代码:

select EMPLOYEE.job_title ,EMPLOYEE.employee_id , EMPLOYEE.department_name 
from EMPLOYEE join (select EMPLOYEE.employee_id
from EMPLOYEE
group by EMPLOYEE.employee_id
having count (distinct EMPLOYEE.department_name) >1)
DEPARTMENT on EMPLOYEE.department_name = DEPARTMENT.department_name;

最佳答案

在我看来,这是一个拼写错误:

您的查询内容为:

MPLOYEE.department_name = DEPARTMENT.department_name;

应该是:

EMPLOYEE.department_name = DEPARTMENT.department_name;

关于MySQL错误1054 : unknown column job_title,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47078175/

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