Recursive function in sql server 2005?
问题 Can anybody suggest programming examples that illustrate recursive functions? For example fibonacci series or factorial.. 回答1: Here are a few articles that I found using google.com ;) Recursion in T–SQL Using recursion in stored procedures A Recursive User-Defined Function (SQL Server 2000) 回答2: Search for "common table expressions." See also this link Update Adding example from the above-referenced link: ;WITH Fibonacci(n, f, f1) AS ( -- This is the anchor part -- Initialize level to 1 and