recursive cte in sql
How to Display calendar dates for any n numbers of years in SQL Server?
A Recursive CTE (Common Table Expression) is a CTE that references itself. In doing so, the initial CTE is repeatedly executed, returning subsets of data, until it returns the complete result set.
SQL Server CTE (Common Table Expression) is temporary result set that is used to reference within another SELECT, INSERT, UPDATE, or DELETE statement.