How to work with sql recursive operations?

I am trying to understand sql recursive statements, but for me it is very difficult. For instance:

enter image description here

Here is an example that I am trying to understand and write down the result.

Can sb pls explain me how it works step by step?

greetings and thanks in advance

maya

+5
source share
2 answers

Also see here http://www.postgresql.org/docs/8.4/static/queries-with.html for steps for recursively evaluating a request.

+2
source

The UNION ALL part gets recursion until it returns more records. I do not know if you can have several parts of UNION ALL.

0
source

All Articles