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

How to use PERIOD_ADD function in MySQL

WBOY
Release: 2023-05-28 18:19:12
forward
1414 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:
source:yisu.com
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