Date format in where clause
192024Dec 18 2002 — edited Dec 19 2002Hi,
I have a question. Our team was tuning a query where we needed to select a date column based solely on the month. We used between and it was very costly. Then we tried date_column_name = to_date('NOV-2002','MMM-YYYY') That sped it up considerably and it's returning the right rows. I just don't understand because I wouldn't have thought it would have met the = to criteria. I mean 11-20-2002 is not = to 'Nov-2002'. Does SQL automatically format the date column to match the format it is being compared to. I need to document this so if you can point me to documentation on it; I would greatly appreciate it.