Reputation: 11
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.
Upvotes: 0
Views: 1226
Reputation: 22534
You can try using below commands.
SET SQL_SAFE_UPDATES=0;
delete from basic_info where rollno>3;
SET SQL_SAFE_UPDATES=1;
Upvotes: 1
Reputation: 53357
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.
Upvotes: 0
Reputation: 101
Create an INDEX
with rollno
column, good for a long term not only this query
Upvotes: 0