oracle迭代查询

    xiaoxiao2021-03-25  115

    oracle迭代查询

    select id as parent_id, sys_connect_by_path(id,'/') as child_ids from menu start with id=1 connect by parent = prior id;

    结果实例:  

    CHILD_IDS -------------------------------------------------------------------------------- /1 /1/6 /1/6/21 /1/6/21/38 /1/6/22 /1/6/22/39 /1/7 /1/7/23 /1/7/23/40 /1/7/24 /1/7/24/41

    转载请注明原文地址: https://ju.6miu.com/read-17245.html

    最新回复(0)