生成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);
posted on 2019-07-18 17:30 hold_on_up 阅读(263) 评论(0) 编辑 收藏 举报
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);
posted on 2019-07-18 17:30 hold_on_up 阅读(263) 评论(0) 编辑 收藏 举报