SQL 手册SQL 函数日期函数year本页总览yearyeardescriptionSyntaxINT YEAR(DATETIME date)返回date类型的year部分,范围从1000-9999参数为Date或者Datetime类型examplemysql> select year('1987-01-01');+-----------------------------+| year('1987-01-01 00:00:00') |+-----------------------------+| 1987 |+-----------------------------+keywordsYEAR