Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 18:07:16
Original
764 people have browsed it

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'

作者 scorpio3k
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!