select level ,id,name,parentid from temptable2
connect by prior parentid(属于顶层的列)=id(子层的列) start with id =1
select t.obj_id ,t.p_obj_id ,t.area_name
from saas.asset_physical_area t
start with obj_id='1'
connect by prior obj_id = p_obj_id;
connect by prior parentid(属于顶层的列)=id(子层的列) start with id =1
select t.obj_id ,t.p_obj_id ,t.area_name
from saas.asset_physical_area t
start with obj_id='1'
connect by prior obj_id = p_obj_id;