mysql where year month code example
Example 1: mysql select month and year
SELECT DATE_FORMAT(test_date,'%Y%m') AS date FROM test_table;
Example 2: mysql query date year
SELECT book_name,dt_of_pub,YEAR(dt_of_pub)
FROM book_mast
WHERE YEAR(dt_of_pub)>2003;