programming-examples/sql/SubqueriesHRDatabase/Write a query to get the details of employees who are managers.sql
2019-11-18 14:05:53 +01:00

9 lines
214 B
SQL

/*Write a query to get the details of employees who are managers.
*/
SELECT *
FROM employees
WHERE EXISTS
(SELECT *
FROM departments
WHERE manager_id = employee_id);