- Without column list:
WITH RECURSIVE query_name AS (SELECT...) - Without keyword
recursive• Nojoinin recursive branch—use comma-join (,) - Without keyword
recursive - Use
cycle ... restrict• Nousing ...sub-clause - No
using ...sub-clause - Minor deviation: contents of <sequence column>
- Workaround: use
row_number() over()to implement top-N query
Note
T131 also allows recursive views, which are not yet covered on this page.
Related
Tutorial:
With— Organize Complex QueriesProduct specific forms:
cycle...set...to...default, cycle...restrict.
Normative References
T131, "Recursive query", is an optional feature in ISO/IEC 9075-2:2023. It first appeared in SQL:1999.0