EXISTS predicate
- Last Updated: July 30, 2025
- 1 minute read
- DataDirect Connectors
- ODBC
- Salesforce 8.0
- Documentation
Purpose
The Exists predicate is true only if the cardinality of the subquery is greater than 0; otherwise, it is false.
Syntax
EXISTS (subquery)
Example
SELECT empno, ename, deptno FROM emp e WHERE EXISTS
(SELECT deptno FROM dept WHERE e.deptno = dept.deptno)