Archives for May 2012

MySQL + UPDATE SELECT Statement + #1093 – You can’t specify target table for update in FROM clause

What I Was Trying To Do I needed to do an Update Select using MySQL, I was expecting it to be something like: UPDATE MyTable SET HitCount = ( SELECT sp.HitCount+1 FROM MyTable sp WHERE sp.email = ‘test@email.com’ ) WHERE email = ‘test@email.com’ Error Message I Got Unfortunately, that returned the error message: #1093 – […]