MySQL Error:1175 UPDATE in MySQL Workbench

When trying to update a row in a table using MySQL Workbench, you could occasionally encounter the following error.

Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.  To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.

This is to warn the user updating the table that the query will probably update the majority of the rows. This is both good and bad at different times.

Go to “Edit” menu, then “Preferences” and then go to “SQL Editor”. Uncheck the option “Safe Update”. To run the query, close and reopen the Workbench or re-connect to the server.

OR OR just use the subsequent SET command to uncheck the “Safe Update” option.
SET SQL_SAFE_UPDATES = 0;

The update statement can be read through using this workbench.

Happy learning!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s