period_add()是MySQL日期/时间函数。此函数将给定时期的给定月份数添加到格式YYMM或YYYYMM中。
语法
select period_add(period, number);
参数
period:格式为YYMM或YYYYMM的期间值
number:期间内要添加的月数。
返回值
此函数返回格式为YYYYMM的结果。
例子1
Select period_add(201808,2);
输出:

例子2
Select period_add(201210,2);
输出:
period_add()是MySQL日期/时间函数。此函数将给定时期的给定月份数添加到格式YYMM或YYYYMM中。
select period_add(period, number);
period:格式为YYMM或YYYYMM的期间值
number:期间内要添加的月数。
此函数返回格式为YYYYMM的结果。
Select period_add(201808,2);
输出:

Select period_add(201210,2);
输出: