标签:oracle
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
原文地址:http://blog.csdn.net/zzy1078689276/article/details/47361739