oracle递归查询

oracle数结构查询【递归查询】
例:
SELECT t.*, t.rowid FROM emp t START WITH t.empno = 7934 CONNECT BY PRIOR t.mgr = t.empno;
根据t.empno = 7934 查询本身及其父节点【sfswcbp,子父子】

例:SELECT t.*, t.rowid FROM emp t START WITH t.empno = 7839 CONNECT BY PRIOR t.empno = t.mgr;
根据t.empno = 7934 查询本身及其子节点【sfswcbp,子子父】

你可能感兴趣的:(oracle)