select
e.first_name, e.last_name,
e.first_name || e.last_name "Name",
d.department_name, d.manager_id,
l.country_id, l.city
from
employees e
join
departments d on e.department_id = d.department_id
join
locations l on d.location_id = l.location_id
where
d.manager_id = &d.manager_id;
删除并在您的where语句中,我猜这是问题所在。
“名称”,d.department_name,d.manager_id,l.country_id,l.city来自雇员e在e.department_id = d.department_id上加入部门d.location_id = l.location_id 其中d .manager_id = d.manager_id;
尝试一下,检查是否对您有帮助;)
select
e.first_name, e.last_name,
concat(e.first_name, ' ', e.last_name) "Name",
d.department_name, d.manager_id,
l.country_id, l.city
from
employees e
join
departments d on e.department_id = d.department_id
join
locations l on d.location_id = l.location_id
where
d.manager_id = &d.manager_id;