比如今天是2019-10-18
效果要取出2019-10-18到2019-10-28的所有日期
select to_char(TRUNC(sysdate) + interval '-1' day + LEVEL, 'yyyy-MM-dd') AS FDATE
from dual
CONNECT BY LEVEL <= 11;
注意一下日期的转换,
where to_char(日期,'yyyy-MM-dd') between to_char(sysdate,'yyyy-MM-dd') and to_char(sysdate+10,'yyyy-MM-dd')