Similar questions 1 more →
SQL & Queries


Answer & solution
Official answer: B
There is no B row with Name=Arun, so the inner query returns an empty relation. A comparison quantified by ALL over an empty set is true: there is no counterexample. Consequently all three rows of A satisfy the WHERE condition, returning Id values 12, 15, 99. The count is 3, B.
Check: ALL means every returned value satisfies the comparison, not that at least one value exists. NOT EXISTS a violating subquery row is true when there are no subquery rows at all. ANY would have the opposite empty-set truth value, false.