Returns the year for date, in the range 1000 to 9999, or 0 for the “zero” date. Returns NULL if date is NULL.
SELECT YEAR('1987-01-01'); 1987