period_add()是MySQL日期/时间函数。此函数将给定时期的给定月份数添加到格式YYMM或YYYYMM中。
select period_add(period, number);
period:格式为YYMM或YYYYMM的期间值
number:期间内要添加的月数。
此函数返回格式为YYYYMM的结果。
链接:https://www.learnfk.comhttps://www.learnfk.com/mysql/mysql-period-add-function.html
来源:LearnFk无涯教程网
Select period_add(201808,2);
输出:
Select period_add(201210,2);
输出:
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)