EXISTS/NOT EXISTS Predicate Syntax | Teradata Vantage - EXISTS/NOT EXISTS Predicate Syntax - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantageā„¢
[NOT] EXISTS subquery

Syntax Elements

subquery
A subquery that selects the same number of expressions as are specified in the expression or list of expressions.
The subquery cannot specify a SELECT AND CONSUME statement.
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.
Using 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.