programming-examples/sql/SubqueriesHRDatabase/Write a query to display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a T.sql
2019-11-18 14:05:53 +01:00

10 lines
376 B
SQL

/*Write a query to display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a T.
*/
SELECT employee_id, first_name, last_name
FROM employees
WHERE department_id IN
( SELECT department_id
FROM employees
WHERE first_name LIKE '%T%' );