Instruction
Amazing work! It's time to wrap things up. In this part, we learned that:
- A recursive CTE is a CTE that refers to itself.
- The general syntax is:
WITH RECURSIVE cte_name AS ( SELECT ... -- anchor member UNION (ALL) SELECT ... FROM cte_name ... -- recursive member WHERE .... -- termination check ) SELECT ... FROM cte_name ... -- invocation - The anchor member is the starting point for recursion.
- The recursive member must query the same CTE.
- The termination check stops the recursion at some point.
- The invocation is used to show any results.
Okay, are you ready for a short quiz?
Exercise
Click to continue.



