SQL YEAR()函數
YEAR(date)
返回年份日期,範圍為1000〜9999或0
mysql> SELECT YEAR('98-02-03'); +---------------------------------------------------------+ | YEAR('98-02-03') | +---------------------------------------------------------+ | 1998 | +---------------------------------------------------------+ 1 row in set (0.00 sec)