MySQL can't specify target table for update in FROM clause
If you are a developer or DB administrator it's a common situation that you need to update MySQL table , for example to set user statuses depending on Id column.
Let's say that we need to unvalidate users with Id < 100. If you try to run the following query:
update Users set Valid = 0
where Id in (
select Id from Users where Id < 100
)
You'll get the error message:
#1093 - You can't specify target table 'xxx' for update in FROM clause