日期:2014-05-16 浏览次数:20386 次
select lpad(' ',4*(level-1))||ename name ,empno,mgr from emp start with mgr is null connect by prior empno=mgr; NAME EMPNO MGR -------------------- --------- --------- KING 7839 JONES 7566 7839 SCOTT 7788 7566 ADAMS 7876 7788 FORD 7902 7566 SMITH 7369 7902 BLAKE 7698 7839 ALLEN 7499 7698 WARD 7521 7698 MARTIN 7654 7698 TURNER 7844 7698 JAMES 7900 7698 CLARK 7782 7839 MILLER 7934 7782 14 rows selected. SQL>