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