Introduction
Fibonacci series is a series of number in which first two numbers are 0 and 1, and each number is a sum of preceding two numbers. Fibonacci series is denoted by F(n) where n=0 or 1. Fibonacci numbers are:
Calculating Fibonacci series
There are various methods to calculate Fibonacci series, here I am describing simplest way to calculate Fibonacci series with the help of SQL Server.
Example:
Type following code in editor window to calculate Fibonacci series.
Now select whole code and press F5 to execute selected code.
Output: