一个简单的整数生成器
查询 :
WITH generator ( value ) AS (
SELECT 1 FROM DUAL
UNION ALL
SELECT value + 1
FROM generator
WHERE value < 10
)
SELECT value
FROM generator;
输出 :
VALUE 1
2
3
4
5
6
7
8
9
10
查询 :
WITH generator ( value ) AS (
SELECT 1 FROM DUAL
UNION ALL
SELECT value + 1
FROM generator
WHERE value < 10
)
SELECT value
FROM generator;
输出 :
VALUE 1
2
3
4
5
6
7
8
9
10