oracle 向上递归 向下递归查询

来源:互联网 发布:单片机电流采样电路 编辑:程序博客网 时间:2024/05/22 13:22
---- 向上递归 id 最小级别 
select distinct text,type
  from t_test_plan_ganttmodels t 
  start with id = '0d143095102e4e39b52defbaf1e3c993' 

  connect by prior parent = id 



---- 向下递归 id 最大级别
select distinct text ,type
  from t_test_plan_ganttmodels t 
 start with t.id = '0d143095102e4e39b52defbaf1e3c993' 
connect by prior id = parent 

原创粉丝点击