How to continously add values of starting row and next row to it
问题 i just want to create an sql query and the result is something like on the image., something like Fibonacci sequence in SQL. Ex. Column 1: 10 , then the value of Result column is Result: 10 , since that is the first row. , then assuming that the value of column1 2nd row is 50, then the value of Result 2nd row will be 60.. (Result: 60).. and so on. Sample is the image below. How can i do that continuously ? any help would be appreciated. Thanks 回答1: If you are using MSSQL2012 or higher you can