Ben voilà.
Je cherche, je cherche et point ne trouve.
Une table 'toto' avec lien hierarchique.
id;libelle;id_pere
1; lib1; NULL
2; lib2; 1
3; lib3; 1
4; lib4; 2
5; lib5; 3
6; lib6; 4
7; lib7; 5
Comment faire pour parcourir la hierachie montante ou descendante à partir d'un point défini ?
exemple : hierarchie descendante à partir de id=2 sous oracle
SELECT id FROM toto CONNECT BY PRIOR id=id_pere START WITH id=2
me retourne 2,4,7.
Comment faire sous MySQL ?
Merci.
Partager