Which construct in SQL is used to test whether a subquery has any tuples in…
2009
Which construct in SQL is used to test whether a subquery has any tuples in its result?
- A.
UNIQUE
- B.
EXISTS
- C.
GROUP BY
- D.
EXCEPT
Attempted by 220 students.
Show answer & explanation
Correct answer: B
The EXISTS operator is used in SQL to test whether a subquery returns any rows. It evaluates to TRUE if the subquery yields at least one tuple, and FALSE otherwise. This construct is specifically designed for existence checks within queries.
A video solution is available for this question — log in and enroll to watch it.