Is it possible to capture data from a WHERE clause?
- by Kristopher Ives
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())
Wishful thinking, or possible with MySQL?