Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE tha
2015-02-02 10:14
489 查看
在更新或删除数据库中的数据时出现了这种错误: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 Queries and reconnect.
例如:update statistic set country = 'unknown' where country = 'NO';
原因:MySql运行在safe-updates模式下,该模式会导致非主键条件下无法执行update或者delete命令,也就是说where后面的条件不是主键
解决办法:
1.执行命令SET SQL_SAFE_UPDATES = 0;修改数据库模式,再执行之前的update语句;
2.可以带一个主键条件:update statistic set country = 'unknown' where country = 'NO' and id >= 0;
SQL Queries and reconnect.
例如:update statistic set country = 'unknown' where country = 'NO';
原因:MySql运行在safe-updates模式下,该模式会导致非主键条件下无法执行update或者delete命令,也就是说where后面的条件不是主键
解决办法:
1.执行命令SET SQL_SAFE_UPDATES = 0;修改数据库模式,再执行之前的update语句;
2.可以带一个主键条件:update statistic set country = 'unknown' where country = 'NO' and id >= 0;
相关文章推荐
- Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE tha
- Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE tha
- Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE tha
- Mysql Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
- Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that
- Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE
- Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that
- Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that
- 【MySQL笔记】解除输入的安全模式,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 Queries and reconnect.
- Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that
- Error Code: 1175.You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.
- Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that
- Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that
- Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE
- MySQL错误: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 easonjim
- Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE
- ErrorCode:1175.You are using safe update mode and you tried to update a table without a WHERE that u
- rror 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 reconnec
- 处理MySQL更新表时ErrorCode:1175.You are using safe update mode and you tried to update a table without a WHERE that uses a KEY