码迷,mamicode.com
首页 > 数据库 > 详细

Oracle树查询(查询所有子节点包含自己)

时间:2019-06-14 18:26:30      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:table   div   color   with   col   from   sele   start   rom   

查询 某ID 所有的子孙包含自己:

  

 select * from tableName t
    start with t.pid = 2c948a836b4f94b4016b5000c386014b
            or t.id = 2c948a836b4f94b4016b5000c386014b
   connect by t.pid = prior t.id

 

Oracle树查询(查询所有子节点包含自己)

标签:table   div   color   with   col   from   sele   start   rom   

原文地址:https://www.cnblogs.com/qing-xia/p/11024467.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!