Oracle Magazine, September/October 2018
Database Developer and DBA ETL ORACLE MAGAZINE SEPTEMBER OCTOBER 2018 89 EMPNO ENAME MGR 7566 JONES 7839 7698 BLAKE 7839 7782 CLARK 7839 Now the second level in the hierarchy has been established and it returns a set of rows that is the input for deriving the third level of the hierarchy I take the query from Listing 3 nest it again as an inline view into a wrapper query and join MGR to the EMPNO column as shown in Listing 4 Listing 4 Third level of the hierarchy via a join SQL select e3 empno e3 ename e3 mgr 2 from emp e3 3 select e2 empno e2 ename e2 mgr 4 from emp e2 5 select empno mgr 6 from emp 7 where mgr is null inner 8 where e2 mgr inner empno inner 9 where e3 mgr inner empno EMPNO ENAME MGR 7902 FORD 7566 7788 SCOTT 7566
You must have JavaScript enabled to view digital editions.