zoukankan      html  css  js  c++  java
  • mysqlworkbench 执行update语句报错:You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

    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

    解决办法1:

    其实错误提示中已经给出了解决办法了

    关闭安全模式:

    Edit --> Preferences --> SQL Editors-->取消沟选 Safe Updates 先项

    别忘记重启MysqlWorkbench,重启之后就可以正常执行更新语句了


    解决办法2:
    参考:https://blog.csdn.net/sanpic/article/details/79879408

    可以通过以下SQL进行状态查询

    
    
    showvariables like 'sql_safe%';

    解决方案:

    1. 执行SQL:
        set sql_safe_updates=0;
        或
        set sql_safe_updates=off;
    
    
    


  • 相关阅读:
    第二周总结
    个人总结
    软件设计模式7
    软件设计模式6
    软件设计模式5
    软件设计模式4
    软件设计模式3
    软件设计模式2
    软件设计模式1
    软件构造2
  • 原文地址:https://www.cnblogs.com/kaerxifa/p/11049888.html
Copyright © 2011-2022 走看看