16.20 - Usage Notes - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Advanced SQL Engine
Teradata Database
Release Number
Release Date
March 2019
Content Type
Programming Reference
Publication ID
English (United States)

The function of the EXISTS predicate is to test the result of subquery.

If execution of the subquery returns response rows then the where condition is considered satisfied.

Note that use of the NOT qualifier for the EXISTS predicate reverses the sense of the test. Execution of the subquery does not, in fact, return any response rows. Instead, it returns a boolean result to indicate whether responses would or would not have been returned had they been requested.