1.需求
递归查询父节点及其所属子节点
2.实现
SELECT rofyxm.rofyxm_fjnm,rofyxm.rofyxm_mc,PRIOR rofyxm.rofyxm_fjnm,PRIOR rofyxm.rofyxm_mc,LEVEL lev FROM rofyxm
START WITH LEN(ROFYXM_FJNM)=4--父级编号起始条件
CONNECT BY NOCYCLE SUBSTR(ROFYXM_FJNM,0,LEN(ROFYXM_FJNM)-4)=PRIOR ROFYXM_FJNM--有prior的为父级
3.效果