ORACLE--Connect By、Level、Start With的使用(Hierarchical query-层次查询)

查找员工编号为7369的领导: 1 SELECT LEVEL,E.* FROM EMP E CONNECT BY PRIOR E.MGR = E.EMPNO START WITH E.EMPNO = 7876 2 ORDER BY LEVEL DESC "start with" -- this identifies all LEVEL=1 nodes in the tree "connect b
相关文章
相关标签/搜索