I have a scenario where I'm calculating something in the WHERE
clause of my SQL, but I also want to get that calculation - since it's expensive. Is it possible to get the results of something done in the WHERE
clause, like this:
SELECT `foo` FROM `table` WHERE (foo = LongCalculation(`column`))
Wishful thinking, or possible with MySQL?
EDIT: Calculation is column dependent