EXISTS Quantifier - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

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.