← 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?
- A.It returns wrong results
- B.It cannot stop loops
- C.It is not allowed in any database
- 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 →