Management & CommerceHardMBA placement (Analytics)

Table a(cust) has rows Asha, Ravi, Meena, Ravi and table b(cust) has rows Ravi, Kiran. How many rows does SELECT cust FROM a EXCEPT SELECT cust FROM b return?

  1. A. 3
  2. B. 1
  3. C. 4
  4. D. 2

Correct answer: D. 2

EXCEPT returns distinct rows of the first query that are absent from the second: Asha and Meena. Both copies of Ravi are removed, and EXCEPT (like UNION) removes duplicates, so the result has 2 rows.

More Operations, Supply Chain & Business Analytics questions

Exams that ask this topic