NexusDB Manual V3 > SQL Reference > Predicates
Specify a test for a non-empty set.
Syntax
<exists predicate> ::= EXISTS <table subquery>
Notes
Examples
SELECT studentID, studentName FROM students s WHERE EXISTS ( SELECT COUNT( * ) FROM enrolls WHERE studentID = s.studentID HAVING COUNT( * ) > 2 )
SELECT studentID, studentName FROM students s WHERE EXISTS ( SELECT COUNT( * ) FROM enrolls WHERE studentID = s.studentID HAVING COUNT( * ) = 0 )
Conformance
|
© Nexus Database Systems Pty Ltd.
