摘要:
connect by prior start with语句ORACLE数据库的树型结构递归查询,如用在组织架构树型结构中取得某树节点的递归路径:--子取父select DID, GNAME from S_Group CONNECT BY PRIOR PID = DID START WITH DID='5'Order By DID --父取子select DID, GNAME from S_Group CONNECT BY PRIOR DID = PID START WITH DID='2' Order By DID--由人员得到所在顶级部门的名字Select D 阅读全文