Subqueries in the WHERE clause

Subqueries in the WHERE clause work as part of the row selection process. You use a subquery in the WHERE clause when the criteria you use to select rows depend on the results of another table.

 Example
 The query in two steps
 Purpose of a subquery in the WHERE clause