日期:2014-05-16 浏览次数:20512 次
create table TESTTEMP ( parent_ID VARCHAR2(30), son_ID VARCHAR2(30) ); insert into TESTTEMP values('1','0'); insert into TESTTEMP values('1','2'); insert into TESTTEMP values('1','3'); insert into TESTTEMP values('1','4'); insert into TESTTEMP values('1','7'); insert into TESTTEMP values('4','5'); insert into TESTTEMP values('5','6'); insert into TESTTEMP values('7','8'); insert into TESTTEMP values('8','9'); insert into TESTTEMP values('9','10'); commit; select * from TESTTEMP start with parent_ID='1' connect by parent_ID= prior son_ID