0
votes

in mysql workbench im trying to execute

delete from basic_info where rollno>3; 

this query but im getting this message

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.

3

3 Answers

1
votes

You can try using below commands.

SET SQL_SAFE_UPDATES=0;
delete from basic_info where rollno>3;
SET SQL_SAFE_UPDATES=1;
0
votes

Create an INDEX with rollno column, good for a long term not only this query

0
votes

You didn't say which MySQL Workbench you are using, but make sure you always use the latest one to get all latest bugfixes.

Since you obvioulsy have a where clause in your query it looks like it is not recognized (which would be a bug). Hence my advice to use the latest version.

In any case you can disable the safety check in the preferences of MySQL Workbench.

enter image description here