In SQL Server, You can create the fibonacci Seriense user the SQL Command.
— Fibonacci Series
;with fibo as (
select 1 as fibA, 1 as fibB, 1 as seed, 1 as num
union all
select (seed + fibA)fibA , (fibA + fibB) fibB, fibA as seed, (num+1) as num
from fibo
where num<12
)
select fibA,fibB
from fibo

very usefull…
LikeLiked by 1 person
Hi anant, thanks. If you need one more logical sql query, see other blogs.
LikeLike