Du kan använda connect by
klausul.
I ditt fall kan SQL se ut så här:
select child, parent, level
from family_tree
connect by prior parent = child
Du kan använda connect by
klausul.
I ditt fall kan SQL se ut så här:
select child, parent, level
from family_tree
connect by prior parent = child