生成1-100之間的數列

WITH cte_a (n)
AS (SELECT 1 AS n
    UNION ALL
    SELECT n + 1
    FROM cte_a
    WHERE n < 100)
SELECT n
FROM cte_a
OPTION (MAXRECURSION 0);
相關文章
相關標籤/搜索