vrijdag 12 april 2013

Oracle: all rows in a tree node

In Oracle 10, if you want to select all rows in een tree node do:

SELECT t.* FROM <table> t
START WITH t.ID = 'startvalue'
CONNECT BY PRIOR t.ID = t.PARENT_ID

Geen opmerkingen:

Een reactie posten