复制代码 代码如下:
select count(0) cou,max(levels)+1 as levels
select C.a1,C.a2,C.levels...
from
(Select A.a1 ,A.a2,,,
level levels//层次关系
from A
where A.a1=,,,
and A.a2=....
start with A.a1 = 12
connect by nocylce prior A.ID=A.ParentID
) C left join B
on C.文件ID=B.文件ID
and C.文件类型=文件夹
复制代码 代码如下:
select count(0) cou,max(levels)+1 as levels
select C.a1,C.a2,C.levels...
from
(Select A.a1 ,A.a2,,,
level levels//层次关系
from A
left join B
on C.文件ID=B.文件ID
where C.文件类型=文件夹
and A.a1=,,,
and A.a2=....
start with A.a1 = 12
connect by nocylce prior A.ID=A.ParentID
) C
新闻热点
疑难解答