i need sql query. have table:
item parent 1 null 2 1 3 2 4 2 5 3 6 5 7 5 8 4 9 8 10 1 11 10 12 10 13 8 chosen item, i'd need following result:
chosen item 9: family list: 8,4,2,1
you can resolve using start with , connect by
oracle documentation hierarchical queries
the sql in case following
select item t start item = 9 connect prior parent = item
Comments
Post a Comment