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?

  1. A.

    UNIQUE

  2. B.

    EXISTS

  3. C.

    GROUP BY

  4. 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.

Explore the full course: Mppsc Assistant Professor