SUBQUERY

Explained

  • The subquery (SELECT department_id FROM departments WHERE department_name = 'IT') retrieves the department ID for the ‘IT’ department.
  • The main query SELECT employee_name FROM employees WHERE department_id = ... then uses this department ID to find all employees working in the ‘IT’ department.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top