Home  >  Article  >  Database  >  mysql workbench执行update操作报错_MySQL

mysql workbench执行update操作报错_MySQL

WBOY
WBOYOriginal
2016-06-01 13:11:241407browse

错误代码:

You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.

错误原因:修改或者删除SQL语句执行时用非主键作为条件会被认为是“不安全”的。

解决方案:修改默认设置

执行如下代码:

SET SQL_SAFE_UPDATES = 0;

设置安全修改为0(0为false,1为true),设置true或者false也是可以的




Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn