时间:2021-07-01 10:21:17 帮助过:38人阅读
Oracle语句如下:
使用方法:start with.....connect by prior。其中start with后面跟的条件1是父节点的查询条件,connect by prior后面跟的条件2是与记录的父节点相同的子节点中的数据。
示例:
SELECT id, name as text, parent_id as parentId from TF_SYS_T_ACTION action where 1 = 1 and action.id in (select caction.action_id from TF_SYS_T_CUSTOMERACTION caction where caction.cust_domain = '110108') START WITH parent_id = '0' CONNECT BY PRIOR id = parent_id
版权声明:本文为博主原创文章,未经博主允许不得转载。
Oracle父节点及其子节点数据的查询
标签:oracle