🎙 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 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?

  1. A.Remove the anchor
  2. B.Use ORDER BY in the recursive part
  3. C.Use a LEFT JOIN
  4. 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 →