oracle递归查询

select dept_id ,dept_name,parent_id,stutas ,remark,

level as lev

from pub_depart_info 

where  stutas=1

start with pub_depart_info.dept_id='1001'

connect by prior pub_depart_info.dept_id = pub_depart_info.parent_id

order by pub_depart_info.dept_id

 

其中:level为关键字,用于显示递归的层书

posted @ 2015-08-07 14:00  zhuyu528  阅读(96)  评论(0编辑  收藏  举报