一個簡單的整數生成器
查詢 :
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