Home > Database > Mysql Tutorial > body text

mysql workbench执行update操作报错_MySQL

WBOY
Release: 2016-06-01 13:11:24
Original
1474 people have browsed it

错误代码:

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也是可以的




source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template