📜  mysql 以递归方式插入选择 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:21.951000             🧑  作者: Mango

代码示例1
INSERT cte_populated(id)
WITH  RECURSIVE int_seq AS (
SELECT 1 AS val
UNION ALL
SELECT val + 1
FROM int_seq
WHERE val  < 10
)
SELECT int_seq.val FROM int_seq;