MYSQL MONTH YEAR code example
Example 1: mysql query date year
SELECT book_name,dt_of_pub,YEAR(dt_of_pub)
FROM book_mast
WHERE YEAR(dt_of_pub)>2003;
Example 2: month mysql
SELECT MONTH("2017-06-15");
SELECT book_name,dt_of_pub,YEAR(dt_of_pub)
FROM book_mast
WHERE YEAR(dt_of_pub)>2003;
SELECT MONTH("2017-06-15");