oracle CONNECT BY PRIOR叶子节点查找根节点

Posted Chobits

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle CONNECT BY PRIOR叶子节点查找根节点相关的知识,希望对你有一定的参考价值。

   SELECT TRANS_ID

  FROM TRANS_INST

  WHERE connect_by_isleaf=1

  START WITH TRANS_ID =480242

  CONNECT BY PRIOR UP_TRANS_ID = TRANS_ID;

  说明:

  表TRANS_INST(TRANS_ID,UP_TRANS_ID)

  480242表示树的任何一个节点

  TRANS_ID子节点

  UP_TRANS_ID父节点

以上是关于oracle CONNECT BY PRIOR叶子节点查找根节点的主要内容,如果未能解决你的问题,请参考以下文章

oracle 的 start with connect by prior 学习

ORACLE:start with ... connect by prior

Oracle connect by prior 处理树状表

oracle中connect by prior的使用

oracle中 connect by prior 递归查询

oracle 多级菜单查询 。start with connect by prior