Back to Course
SQL for Testers

Multiple row Sub queries

Definition

A multiple-row subquery returns more than one row, and must be used with operators designed for multiple values, such as IN, ANY, or ALL.

Example

SELECT name FROM employees
WHERE department_id IN (SELECT department_id FROM departments WHERE location = 'Delhi');

Why Testers Use Them

Multiple-row subqueries are useful for validating data against a dynamic set of related values — for example, confirming that only employees belonging to a specific set of departments appear in a filtered report.

Ready to master real-world software testing?

Learn manual and automation testing hands-on with mentor-led sessions.

Explore Course