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

具体报错

delete from xxx where xxx= 'xxx'	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.	0.016 sec
  • 由于sql_safe_updatesON,不加主键更改操作会报错。
  • show variables like 'SQL_SAFE_UPDATES';查看状态
    在这里插入图片描述

解决方案

第一种

  • 执行命令SET SQL_SAFE_UPDATES = 0;修改下数据库模式

第二种

  • 在SQL语句后面加上and id>0。如下图所示。
    在这里插入图片描述

posted on 2021-11-22 13:47  愤怒的苹果ext  阅读(34)  评论(0编辑  收藏  举报

导航