MySQL常见问题

MySQL常见问题

  1. Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.

mysql删除记录报错  展示非主键删除  需要跟随 id>=0;

  delete from log where remark ='调用【UA.009】微服务接口' and id>=0;

  

  解决方式:

    a SET SQL_SAFE_UPDATES = 0;执行该命令更改mysql数据库模式。

    b 在where判断条件中跟上主键id    例如:delete from log where remark ='调用【UA.009】微服务接口' and id>=0;

posted @ 2021-07-05 15:03  干饭人~  阅读(40)  评论(0编辑  收藏  举报