EXISTS Quantifier - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
vjt1596846980081.ditamap
dita:ditavalPath
vjt1596846980081.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

SQL supports the EXISTS () logical quantifier for testing the result of subquery search conditions. See Specifying Subqueries in Search Conditions. For more information about the EXISTS quantifier, see Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.

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.