ORACLE any time period all days query, no need to use what all_objects No * query to all days * selectdate2013-11-25 + (rownum
ORACLE queries all the days in any time period, no need to use any all_objects no/* query all the date days from to */select date '2017-11-25 '+ (rownum-1) dt from dual connect by rownum = (date '2017-12-28 '-date '2017-11-25' + 1)/* Query
There is no need to use all_objects to query all the days in any time period of ORACLE.
<无>
/* Query all days from to */select date '2017-11-25 '+ (rownum-1) dt from dual connect by rownum <= (date '2017-12-28 '-date '2017-11-25' + 1)
/* Query the months from to, and the number of days in each month */select to_char (dt, 'yyyy-mm'), count (to_char (dt, 'yyyy-mm') days, mm from (select date '2017-11-25 '+ (rownum-1) dt, to_char (last_day (date '2017-11-25 '+ (rownum-1), 'mm ') mm from dual connect by rownum <= (date '2017-12-28 '-date '2017-11-25' + 1) group by to_char (dt, 'yyyy-mm '), mm order by to_char (dt, 'yyyy-mm ')