programming-examples/sql/JoinHRDatabase/18. Write a query in SQL to display department name and the full name (first and last name) of the manager.sql

5 lines
290 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*18. Write a query in SQL to display department name and the full name (first and last name) of the manager.*/
SELECT department_name, first_name || ' ' || last_name AS name_of_manager
FROM departments D
JOIN employees E
ON (D.manager_id=E.employee_id);