EXISTS predicate
- Last Updated: July 25, 2025
- 1 minute read
- DataDirect Connectors
- ODBC
- Apache Cassandra 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)