Oracle
 sql >> Base de Dados >  >> RDS >> Oracle

Pergunta SQL hierárquica

SELECT  *
FROM    mytable
START WITH
        myid = :id
CONNECT BY
        myparentid = PRIOR myid