select level ,sys_connect_by_path( id , '/' )
from test
start with pid= 1
connect by prior pid = id ; //父id=子id 正树型结构 子id=父id 倒树型结构
select level ,sys_connect_by_path( pid, '/' )
from test
start with pid= 1
connect by prior pid = id ;
创建一个树形结构的表test
通过查询可以比较这两段代码的运行结果的差异,即可理解此函数用法