zoukankan      html  css  js  c++  java
  • Oracle 递归查询子节点和父节点

    一、查询指定记录的父节点或子节点

    1、查询父类以上所有数据

    select  *  from plt_org_info start with id =47 connect by prior id = ParentsId

    2、查询父类以下所有节点数据
    select  *  from plt_org_info start with id =47 connect by prior ParentsId = id
    二、查询所有叶子的父节点
    Select DISTINCT * From VIEW_EJ_ZZJG START WITH JGLX='0207'
    connect by prior FJGID=ZZJGID
    ORDER BY PXH

     

  • 相关阅读:
    第五天
    第四天
    第三天
    四则运算2
    对于搜狗输入法
    用户及用户场景分析
    总结
    第一阶段总结
    第七天
    第六天
  • 原文地址:https://www.cnblogs.com/topboy168/p/15474007.html
Copyright © 2011-2022 走看看