← Quiz: Recursive CTEs: all 15 questions
Quiz: Recursive CTEs · Question 8 of 15
The data has a loop: A manages B and B manages A. What is a safe fix in the query?
The data has a loop: A manages B and B manages A. What is a safe fix in the query?
- A.Remove the anchor
- B.Use ORDER BY in the recursive part
- C.Use a LEFT JOIN
- D.Carry a level column and stop at a maximum depth
Answer & explanation
Correct answer: Carry a level column and stop at a maximum depth
A depth limit (or a visited check on the path) stops endless recursion.
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 →