`

oracle Tree查询

阅读更多

create table test2(menu_id int ,parent_id int ,levelName varchar2(20))

 

 

select t.*,level from test2 t 

   start with t.parent_id=0
  connect by PRIOR  t.menu_id= t.parent_id
  order by level

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics