re: Write a function that shows off something unique or interesting about the language you're using VIEW POST

VIEW FULL DISCUSSION
 

It isn't that difficult to generate the Fibonacci Spiral through Oracle SQL :)

with FIBONACCI (i, FIBO, PREV) as 
(
   select 
      1 i,
      0 FIBO,
      cast( null as number ) PREV 
   from 
      DUAL
   union all
   select 
      f1.i + 1  i,
      f1.FIBO + nvl(f1.PREV,1) FIBO,
      f1.FIBO PREV
   from 
      FIBONACCI f1
   where 
      f1.i < 20
)

select 
   FIBO
from 
   FIBONACCI
order by 
   i;
code of conduct - report abuse