I have a WHERE clause that looks like:
WHERE Month(PA.EntryDate) = Month('11-10-04') and Year(PA.EntryDate) = Year('11-10-04')
Something like that shows up a lot in my DB.
I would like to add a column
EntryMonth as Month(EntryDate)
-- or something to that effect. In MS SQL Server, that would allow me to index the EntryMonth so that an index could be used in the WHERE clause.
Can I do something similar in MySql? Every Google search I try on Calculated Fields is coming up with fields updated by a trigger ... not a true calculated field. Is that the best MySql 5 can offer currently?