select to_char(to_date(20160901, 'YYYYMMDD') + level - 1, 'yyyy-MM-DD') as producetime
from dual
connect by level <=
(trunc(sysdate) - trunc(to_date(20160901, 'YYYYMMDD')) + 1);
The connect by clause defines the interconnectedness of the data in the table. The
level indicates the query depth (the above level indicates the number of days for the query)
ORACLE implements time recursion
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326403998&siteId=291194637
Recommended
Ranking