EXISTS Quantifier
SQL supports the EXISTS (∃) logical quantifier (see SQL Functions, Operators, Expressions, and Predicates) for testing the result of subquery search conditions. See “Specifying Subqueries in Search Conditions” on page 111. For more detail about the EXISTS quantifier, see SQL Functions, Operators, Expressions, and Predicates.
If the subquery would return response rows, then the WHERE condition is considered to be satisfied. Specifying the NOT qualifier for the EXISTS predicate inverts the test.
A subquery used in a search condition does not return any rows. It returns a boolean value to indicate whether responses would or would not be returned.
The subquery can be correlated with an outer query.