NexusDB Manual V3 > SQL Reference > Predicates
Specify a quantified comparison.
Syntax
<quantified comparison predicate> ::= <quantified comparison predicate part 2> ::=
<quantifier> ::=
Notes
a) If the result of the subquery is empty or the comparison is true for every row in the subquery, then the result is TRUE.
b) If the comparison is false for at least one row in the subquery, then the result is FALSE.
c) If any of the values returned by the subquery is null and none of the comparisons are false, then the result is UNKNOWN.
a) If the comparison is true for at least one row in the subquery, then the result is TRUE.
b) If the result of the subquery is empty or the comparison is false for every row in the subquery, then the result is FALSE.
c) If any values returned by the subquery is null and none of the comparisons are true, then the result is UNKNOWN.
Examples
SELECT studentID, studentName FROM students s WHERE studentID = ALL ( SELECT e.studentID FROM courses c LEFT JOIN enrolls e on e.courseID = c.courseID AND e.studentID = s.studentID )
SELECT studentID, studentName FROM students s WHERE studentID = ANY ( SELECT e.studentID FROM courses c LEFT JOIN enrolls e on e.courseID = c.courseID AND e.studentID = s.studentID )
Conformance
|
© Nexus Database Systems Pty Ltd.