I'm doing a homework assignment where the instructions are "Delete all players who live in the same town as player 57 but keep the data about player 57." There is a table called "Players" that has PlayerNo and Town as columns well as various other data. I tried the following query:
delete from players
where town = (select town from players where playerno = 57)
and playerno <> 57;
But am receiving the following error message:
"Error Code: 1093. You can't specify target table 'players' for update in FROM clause"
How do I fix this?