我正在学习SQL连接。但是,我正在运行以下查询,并出现一个错误,提示operand should contain 1 column(s)
下面是查询
SELECT departments.department_name, designations.designation_name, cities.city_name, employees.emp_id, employees.name FROM employees LEFT JOIN cities ON (employees.city_id = cities.id) LEFT JOIN designations ON (employees.designation_id = designations.id) LEFT JOIN departments ON (designations.department_id = departments.id) WHERE employees.status = 1 AND employees.designation_id IN (SELECT designations.department_id, employees.designation_id FROM employees LEFT JOIN designations ON (employees.designation_id = designations.id) LEFT JOIN departments ON (designations.department_id = 3)) AND employees.city_id IN (SELECT employees.city_id FROM employees) AND employees.grade_id IN (SELECT employees.grade_id FROM employees) ORDER BY employees.name DESC
我无法弄清楚这里出了什么问题!
有人可以帮我吗?