How do I compare date in the format dd-mon-yy? For example: 10-NOV-14 > 07-OCT-13.
dd-mon-yy
select expiration_date from grocery where expiration_date < 14
Use STR_TO_DATE:
select expiration_date from grocery where expiration_date < STR_TO_DATE('14-oct-13', '%d-%b-%y')
expiration_date will also need to be wrapped in STR_TO_DATE if it is not already a DATE format.
expiration_date
STR_TO_DATE
DATE