创建层次查询
select level, lpad(' ', 2 * level - 1, '--') || t.deptname, t.deptid
from lbi_department t
start with t.deptid = 1
connect by prior t.deptid = t.parentid
from lbi_department t
start with t.deptid = 1
connect by prior t.deptid = t.parentid
浙公网安备 33010602011771号