month
返回给定日期的月份。返回值范围从 1 到 12。
The date
parameter must be of the DATE or DATETIME type.(date 参数必须是 DATE 或 DATETIME 类型。)
语法
INT MONTH(DATETIME date)
示例
MySQL > select month('1987-01-01');
+-----------------------------+
|month('1987-01-01 00:00:00') |
+-----------------------------+
| 1 |
+-----------------------------+
关键词
MONTH