转发于:http://blog.csdn.net/qq_26684469/article/details/51105188?locationNum=5&fps=1

原来的SET SQL_SAFE_UPDATES = 1;

如果条件定语从句where后面跟的不是主键,则会报上面的错,将上面的安全级别设低一点即可,如下:

SET SQL_SAFE_UPDATES = 0;

再执行更新语句,如

SET SQL_SAFE_UPDATES = 0;
update project.demand set title="硬盘到了,谁来帮我换个硬盘啊"
where title="亲热";

删除null值

delete from comment where c_content is null

***************20171206更新************************  一劳永逸方法

解决方法如下:

    • 打开Workbench的菜单[Edit]->[Preferences...]
    • 切换到[SQL Editor]页面
    • 把[Forbid UPDATE and DELETE statements without a WHERE clause (safe updates)]之前的对勾去掉
    • 点击[OK]按钮
    • 最后记得要重启一下sql editor,建立一个新的连接就可以了。

SQL更新语句,Error Code: 1175. You are using safe update(在进行视图更新的时候遇到)的更多相关文章

  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 To disable safe mode, toggle the option in Preferences -> SQL Queries and reconn

    使用MySQL执行update的时候报错:   MySQL     在使用mysql执行update的时候,如果不是用主键当where语句,会报如下错误,使用主键用于where语句中正常. 异常内容: ...

  2. 【MySQL笔记】解除输入的安全模式,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 Queries and reconnect.

    Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE tha ...

  3. Error Code: 1175. You are using safe update

    使用MySQL执行update的时候报错:Error Code: 1175. You are using safe update mode and you tried to update a tabl ...

  4. 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 Workbench里面使用SQL语句: delete from 表名 提示出错: Error Code: 1175.You are using safe update mode and ...

  5. Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table

    Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table ...

  6. mysql错误:Error Code: 1175. You are using safe update mode and you tried to update a table……

    今天遇到一个mysql错误:   Error Code: . You are using safe update mode and you tried to update a table withou ...

  7. MySql解除安全模式:Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.

    在修改一条数据字段时报错: Error Code: 1175. You are using safe update mode and you tried to update a table witho ...

  8. Mysql 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 update error: Error Code: 1175. You are using safe update mode and you tried to update a table ...

  9. Mysql 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

    今天用mysql workbench在更新数据的时候,出现了下面错误:15:52:39    update wp_posts set post_content = replace(post_conte ...

随机推荐

  1. Emacs编辑器配置

    以前总是用的vim编辑器,今天突然想换emacs 用下.折腾了很久终于搞定.使用的是windows测试环境 emacs下载地址http://ftp.gnu.org/gnu/emacs/windows/ ...

  2. Linux以GB显示内存大小

    Linux以GB显示内存大小 youhaidong@youhaidong-ThinkPad-Edge-E545:~$ free -g total used free shared buffers ca ...

  3. 常用UI框架

    jQuery Smart UI 链接地址:http://smartui.chinamzz.com Liger UI框架链接地址:http://www.ligerui.com/ DWZ富客户端框架(jQ ...

  4. freemarker获取封装类中对象的属性(六)

    freemarker获取封装类中对象的属性 1.设计思路 (1)封装学生类 (2)创建数据模型 (3)新建student.ftl (4)运行Junit测试文件,生成HTML文件 2.封装学生类 Stu ...

  5. Tomcat下使用Druid配置JNDI数据源

    com.alibaba.druid.pool.DruidDataSourceFactory实现了javax.naming.spi.ObjectFactory,可以作为JNDI数据源来配置. 一.下载D ...

  6. VBA Excel WideCharToMultiByte Compile error on 64-bit System

    Compile Error: The code in this project must be updated for use on64-bit systems. Please review and ...

  7. 【BZOJ1969】航线规划(Link-Cut Tree)

    [BZOJ1969]航线规划(Link-Cut Tree) 题面 BZOJ 题解 删边操作 套路呀 离线读入倒过来做 变成加边操作 现在考虑怎么确定两点直接的关键路径条数 如果是一棵树,那么每条边都是 ...

  8. [BZOJ4872][六省联考2017]分手是祝愿

    BZOJ Luogu sol 首先发现肯定有解,又因为每个位置至多操作一次,所以最优解一定是在\([0,n]\)之间 有一种可以在\(O(\sum_{i=1}^{n}\lfloor\frac{n}{i ...

  9. [NOI2006]神奇口袋

    题面在这里 题意 开始时袋中有\(t\)种小球,第\(i\)种小球有\(t_i\)个,之后每次等概率取出一个球,第\(i\)次取球时观察这个球的颜色\(c_i\)放回并向袋中加入\(d\)个颜色为\( ...

  10. AndroidStudio Frameworks detected: Android framework is detected in the project Configure

    出现这个问题应该是文件没有用正确的方式打开.   遇到这种情况,就要去检查下载的这个包的结构.       我的这个文件明显真正的是下面这个文件夹,如果把整个当做一个android文件打开会导致文件结 ...