`
kingmxj
  • 浏览: 177644 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Oracle递归查询

阅读更多
http://www.iteye.com/topic/625574


select   d.*   from  menu d   
start   with   d.PARENTID='0'
connect   by   prior   d.id=d.PARENTID 
order   siblings   by   d.ORDERBY   asc

menu:表名
PARENTID:父id
'0':根节点id
ORDERBY:排序字段
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics