SQLite Forum

Breadth-first graph traversal
Login
You cannot do that because the reference to the recursive table in the recursive select is a reference to the singleton row being recursed.  You do not have access to other rows in the recursive table.

That is, the path 1-2-4 and 1-3-4 are distinct recursion results and both are valid paths from node 1 to node 4.