`
hollowinhart
  • 浏览: 124840 次
  • 性别: Icon_minigender_1
  • 来自: 太原
社区版块
存档分类
最新评论

sql的递归查询

 
阅读更多

表中pid,id两个字段

select pid,id from 表名 start with id= 1102 connect by prior pid=id

select pid,id from 表名 start with id= 1102 connect by prior id=pid

查询出两种顺序的树

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics