---查询所有节点的全路径
select sys_connect_by_path (cate_name, '/'),cate_id,cate_name,parent_id
from PLAN_REPAIR_EQUIP_CATE
--where id = 50
start with PARENT_ID =0
connect by PARENT_ID = prior cate_id;
--查找所有的叶子节点
SELECT a.cate_id,a.cate_name FROM (
select connect_by_isleaf , PLAN_REPAIR_EQUIP_CATE.*
from PLAN_REPAIR_EQUIP_CATE
start with PARENT_ID =0
connect by PARENT_ID = prior cate_id) a WHERE a.connect_by_isleaf=1