ITPub博客

首页 > 数据库 > Oracle > oracle树形菜单查询

oracle树形菜单查询

原创 Oracle 作者:livedba 时间:2012-03-15 21:55:32 0 删除 编辑

oracle树形菜单查询

参考http://space.itpub.net/10159839/viewspace-584603

[@more@]select * from(
select t.function_id,lpad(t.function_name,length(t.function_name)*2+(level-1)*2,'->'),t.function_name,t.parent_id,t.order_,t.fun_state,t.function_type,level from base_function t START WITH t.function_id in(0)
CONNECT BY PRIOR t.function_id=t.parent_id
order siblings by t.order_) tt
where tt.fun_state=1 and tt.function_type=1

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25261409/viewspace-1057600/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: Ant打包实例
请登录后发表评论 登录
全部评论

注册时间:2011-01-21

  • 博文量
    115
  • 访问量
    483884