----返回指定两个时间段的日期,使用to_date函数强制来利用日期做运算。
SELECT to_char(TO_DATE('20091111', 'yyyymmdd')+ LEVEL - 1,'YYYYMMDD') AS DAYOFYEAR
FROM DUAL
CONNECT BY TO_DATE('20091111', 'yyyymmdd')+ LEVEL - 1 <= TO_DATE('20091211', 'yyyymmdd');
-----返回任意两个数之间的所有整数
SELECT 1 + LEVEL - 1 FROM dual CONNECT BY 1 + LEVEL - 1 <= 100;
----返回任意指点字符间的大写字符
SELECT chr(ascii('A') + LEVEL - 1) dxzm
FROM dual
CONNECT BY ascii('A') + LEVEL - 1 <= ascii('Z');
----返回任意指点字符间的小写字符
SELECT chr(ascii('a') + LEVEL - 1) dxzm
FROM dual
CONNECT BY ascii('a') + LEVEL - 1 <= ascii('z');