--根据日期范围
SELECT LEVEL + to_date('20120821', 'yyyy-mm-dd') - 1
FROM dual
CONNECT BY LEVEL < to_date('20120831', 'yyyy-mm-dd') - to_date('20120821', 'yyyy-mm-dd') + 2;
--根据数据范围
SELECT LEVEL + 1-1
FROM dual
CONNECT BY LEVEL <= 10;
--根据日期范围
SELECT LEVEL + to_date('20120821', 'yyyy-mm-dd') - 1
FROM dual
CONNECT BY LEVEL < to_date('20120831', 'yyyy-mm-dd') - to_date('20120821', 'yyyy-mm-dd') + 2;
--根据数据范围
SELECT LEVEL + 1-1
FROM dual
CONNECT BY LEVEL <= 10;