Home > Database > Mysql Tutorial > body text

How to add a 3 month gap in a MySQL date without using the word 'month' with the gap?

WBOY
Release: 2023-08-24 17:29:07
forward
593 people have browsed it

如何在不使用带有间隔的“月份”一词的情况下在 MySQL 日期中添加 3 个月的间隔?

is possible with the help of keyword Quarter as follows -

mysql> Select '2017-06-20' + INTERVAL 1 Quarter AS 'After 3 Months Interval';

+-------------------------+
| After 3 Months Interval |
+-------------------------+
| 2017-09-20              |
+-------------------------+
1 row in set (0.00 sec)
Copy after login

The above is the detailed content of How to add a 3 month gap in a MySQL date without using the word 'month' with the gap?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!