-- ||是连接符,level可以看成常量 select t.fnum,LPAD(' ',3*level-3)||'|-'||fname fname,t.fparent,Level lev From m_depart t --start with后面是条件1 start with fparent is null --connect by Prior后面是条件2 connect by Prior fnum=fparent
-- ||是连接符,level可以看成常量
select t.fnum,LPAD(' ',3*level-3)||'|-'||fname fname,t.fparent,Level lev
From m_depart t
--start with后面是条件1
start with fparent is null
--connect by Prior后面是条件2
connect by Prior fnum=fparent