🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Recursive CTEs: all 15 questions

Quiz: Recursive CTEs · Question 15 of 15

What is a downside of using UNION instead of UNION ALL inside a recursive CTE?

What is a downside of using UNION instead of UNION ALL inside a recursive CTE?

  1. A.It returns wrong results
  2. B.It cannot stop loops
  3. C.It is not allowed in any database
  4. D.It must remove duplicate rows, which makes the query slower
Answer & explanation

Correct answer: It must remove duplicate rows, which makes the query slower

UNION can stop loops over identical rows, but checking for duplicates costs time.

Can you get the rest right without peeking?

Take the timed Quiz: Recursive CTEs quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →