with basedata as
( select level lv, level -1 plv from dual connect by level <= 100 )
'
recur ( lv,plv, n1,n2, v ) as
(
select a.lv,a.plv,0 n1, 0 n2, 1 v from basedata where a.lv = 1
union all
select a.lv,a.plv,b.n2, b.v, b.n2 + b.v from basedata a, recur b where b.lv = a.plv )
select * from recur
참 재미있습니다 아마도 지금까지 불가능하였던 연립방정식의 해 구하기도 가능할 듯 |