Oracle 输出树形结构
树形结构,根 select connect_by_root(cat.parentid) root,cat.id,cat.parentid,cat.name,cat.code from V cat start with cat.parentid in (37558) connect by prior cat.id= cat.parentid
树形结构,一级子目录 select connect_by_root(cat.id) root,cat.code from A cat start with cat.parentid in (select id from bto_c2.category_new where parentid = 37558) connect by prior cat.id= cat.parentid