Oracle中查询本月星期5的所有日期列表的语句
发布时间:2016-12-28 来源:查字典编辑
摘要:复制代码代码如下:SELECT*FROM(SELECTTRUNC(SYSDATE,'mm')+ROWNUM-1DAYSFROM(SELECT...
复制代码 代码如下:
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'
作者 scorpio3k