SQL 递归

1

;WITH Numbers AS
(
    SELECT n = 1
    UNION ALL
    SELECT n + 1
    FROM Numbers
    WHERE n+1 <= 10
)
SELECT n
FROM Numbers

 

posted @ 2021-03-02 18:20  waityu  阅读(192)  评论(0编辑  收藏  举报