mysql update error SQL_SAFE_UPDATES=0

By | 2013년 08월 11일

YOU ARE USING SAFE UPDATE MODE AND YOU TRIED TO UPDATE A TABLE WITHOUT A WHERE THAT USES A KEY COLUMN

Error Code: 1175
You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
Every found that kind of error when trying to update rows in mysql? It’s because you tried to update a table without a WHERE that uses a KEY column (err …).

Anyway, The quick fix is to add SET SQL_SAFE_UPDATES=0; before your update query. Here’s the example:

SET SQL_SAFE_UPDATES=0;
DELETE FROM people WHERE person_status = ‘deceased’;