Home > Database > Mysql Tutorial > How to use PERIOD_ADD function in MySQL

How to use PERIOD_ADD function in MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-05-28 18:19:12
forward
1509 people have browsed it

PERIOD_ADD(month, add)

SELECT PERIOD_ADD(1601,2) 
SELECT PERIOD_ADD(191602,3) 
SELECT PERIOD_ADD(191602,-3)
Copy after login
-> 201603
-> 191605
-> 191511
Copy after login

This function returns the operation result of increasing or decreasing month. The format of month is yyMM or yyyyMM, and the results returned are in yyyyMM format. , add can pass negative values

The above is the detailed content of How to use PERIOD_ADD function in MySQL. For more information, please follow other related articles on the PHP Chinese website!

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
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
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