oracle sql generate list of days code example Example: oracle sql generate list of days SELECT trunc(sysdate - ROWNUM) DT FROM DUAL CONNECT BY ROWNUM < 366;