programming-examples/sql/JoinHRDatabase/6. Write a query in SQL to display all departments including those where does not have any employee.sql
2019-11-18 14:05:53 +01:00

5 lines
280 B
SQL

/*6. Write a query in SQL to display all departments including those where does not have any employee.*/
SELECT E.first_name, E.last_name, E.department_id, D.department_name
FROM employees E
RIGHT OUTER JOIN departments D
ON E.department_id = D.department_id;