I\'m trying to update the column visited
to give it the value 1. I use MySQL workbench, and I\'m writing the statement in the SQL editor from inside the workben
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.
Turn OFF "Safe Update Mode" temporary
SET SQL_SAFE_UPDATES = 0;
UPDATE options SET title= 'kiemvieclam24h' WHERE url = 'http://kiemvieclam24h.net';
SET SQL_SAFE_UPDATES = 1;
Turn OFF "Safe Update Mode" forever
Mysql workbench 8.0:
MySQL Workbench => [ Edit ] => [ Preferences ] -> [ SQL Editor ] -> Uncheck "Safe Updates"
Old version can:
MySQL Workbench => [Edit] => [Preferences] => [SQL Queries]
If you are in a safe mode, you need to provide id in where clause. So something like this should work!
UPDATE tablename SET columnname=1 where id>0