如何获取 MySQL 中当前月份的最后一天?
借助以下 MySQL 查询,我们可以获取当前月份的最后一天 −
mysql> SELECT LAST_DAY(now()) AS 'LAST DAY OF CURRENT MONTH'; +---------------------------+ | LAST DAY OF CURRENT MONTH | +---------------------------+ | 2017-10-31 | +---------------------------+ 1 row in set (0.00 sec)
广告