Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

show hierarchy

user65088810 hours ago

create table mytable(myid number,descrip varchar2(200),parentid number);

insert into mytable values(22,'Main Console',null); -- 22 is parent of all
insert into mytable values(64,'group1',22);
insert into mytable values(57,'group2',22);
insert into mytable values(59,'group3',22); -- group 3 has some children

insert into mytable values(531,'group3_child1',59);
insert into mytable values(534,'group3_child2',59);
commit;

How can we see the result in this format?

Comments
Post Details
Added 10 hours ago
4 comments
41 views