with subqry(id,name,parent_id) as(
select id,name,parent_id from pro_type_manage where id in ('5799936','5799946') -- start with
union all
select test1.id,test1.name,test1.parent_id from pro_type_manage as test1,subqry
where test1.parent_id = subqry.id --connect by
)
select* from subqry;
select id,name,parent_id from pro_type_manage where id in ('5799936','5799946') -- start with
union all
select test1.id,test1.name,test1.parent_id from pro_type_manage as test1,subqry
where test1.parent_id = subqry.id --connect by
)
select* from subqry;