The below program will do so
--generate a number table with 10 Lac(10,00,000) rows
;with cte as(
select rn=rn+1 from cte where rn<1000000 --10 Lac
--Project the record
option (maxrecursion 0)
At first we have generated a number table with 10 Lac (1000000) rows using recursive CTE. Finally we have projected the records.