ORACLE——查询某段时间内的每一天

SELECT to_date('2019-01-01\', 'yyyy-MM-dd\') + ROWNUM - 1 AS dateday 
FROM dual 
CONNECT BY ROWNUM <= (to_date('2021-08-24\', 'yyyy-MM-dd\') - to_date('2019-01-01\', 'yyyy-MM-dd\')) 

 

posted @ 2021-08-23 15:39  AaronLi  阅读(670)  评论(0编辑  收藏  举报