日期:2014-05-16  浏览次数:21975 次

Oracle查询本月星期5的所有日期列表

SELECT *
  FROM (SELECT TRUNC(SYSDATE, 'mm') + ROWNUM - 1 DAYS
          FROM (SELECT LEVEL
                  FROM DUAL
                CONNECT BY LEVEL <=
                           TRUNC(LAST_DAY(SYSDATE)) - TRUNC(SYSDATE, 'mm') + 1))
 WHERE TO_CHAR(DAYS, 'd') = '6'