When I am trying to execute this query in MySQL Workbench 'DELETE FROM Job;
', I am getting below 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.
So, how can I resolve this error, why I cannot Execute the simple delete query?
Above MySQL Workbench error also, shows solution, you need to disable Safe Mode in MySQL Workbench, you can use either of the following 2 methods.
You can simply disable it using below query
SET SQL_SAFE_UPDATES = 0;
OR
You can run this query which can be better way to do it
SET SQL_SAFE_UPDATES = 0;
#SQL Query Here
#Again Enable Safe Update
SET SQL_SAFE_UPDATES = 1;
To disable it using MySQL Workbench User Interface
Thanks, hope it helps.
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly