programming-examples/sql/SubqueriesHRDatabase/Write a query to get the details of employees who manage a department.sql

7 lines
193 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*Write a query to get the details of employees who manage a department.
*/
SELECT *
FROM employees
WHERE employee_id=ANY
( SELECT manager_id FROM departments );