Multiple choice technology databases

Which operator compares a value to every value returned by a subquery?

  1. IN

  2. OF

  3. ALL

  4. ANY

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The ALL operator in SQL compares a value to every value returned by a subquery, evaluating to true only if the comparison is true for all values. For example, 'salary > ALL (subquery)' returns true only if the salary is greater than every single value returned by the subquery. IN checks membership, ANY returns true if at least one comparison succeeds, and OF is not a valid SQL operator.