查询自己和下级数据 id 查询数据的标识 parentid 上级id select * from PAS_B_DEPT t start with t.id= '1020' connect by prior t.id = t.parentid 避免重复循环 id 查询数据的标识 parentid 上级id select * from PAS_B_DEPT m start with m.id='1020' connect by nocycle prior m.id=m.parentid;