How to sql-recursive statements work?
-
06-12-2019 - |
Question
I am trying to understand sql recursive statements, but it is really hard for me. For example:
Thats an exampe I am trying to understand and to write down the output.
Can sb pls explain me how this works, step by step?
greetings and thx in advance
maya
Solution
Also, see here - http://www.postgresql.org/docs/8.4/static/queries-with.html, where the steps of the recursive query evaluation are described.
OTHER TIPS
The UNION ALL portion gets recursed until it returns no more records. I don't know if you can have multiple UNION ALL portions.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow