Home > Database > Mysql Tutorial > SQL中取得传入月份值的所有天数

SQL中取得传入月份值的所有天数

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 14:54:47
Original
1544 people have browsed it

SQL中取得传入月份值的所有天数 使用Oracle PL/SQL 无 select lpad(rownum, 2, 0) ymd from dualconnect by rownum = (SELECT add_months(trunc(to_date('201002', 'yyyymm'), 'mm'), 1) - trunc(to_date('201002', 'yyyymm'), 'mm') FROM DUAL)

SQL中取得传入月份值的所有天数
使用Oracle
PL/SQL
select lpad(rownum, 2, 0) ymd
  from dual
connect by rownum <=
           (SELECT add_months(trunc(to_date('201002', 'yyyymm'), 'mm'), 1) -
                   trunc(to_date('201002', 'yyyymm'), 'mm')
              FROM DUAL)
Copy after login
Related labels:
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
Latest Issues
sql file
From 1970-01-01 08:00:00
0
0
0
php - Overhead of prepare vs sql?
From 1970-01-01 08:00:00
0
0
0
Print sql statement
From 1970-01-01 08:00:00
0
0
0
Pass array to SQL insert query using PHP
From 1970-01-01 08:00:00
0
0
0
sql optimization or
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template