转发于: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. grub2与grub区别

    关于版本: GRUB2 使之版本号为1.98之后的grub:GRUB legacy(版本为0.97)是指GRUB,而非GRUB2,grub是指 grub1.97 和以前的,grub 2 指的是 gru ...

  2. mysql 查询表死锁 和结束死锁的表步骤

    1.查询是否锁表 show OPEN TABLES ; 2.查询进程 show processlist 查询到相对应的进程===然后 kill    id 3.查看正在锁的事务 SELECT * FR ...

  3. Java中的i++和i--

    /** * @Title:DataCate.java * @Package:com.you.dao * @Description:数据类型转换 * @Author: 游海东 * @date: 2014 ...

  4. Meet Python

    关于python 入门书<Head First Python>的一些读书笔记,用以备忘. 下载安装Python 下载地址: https://www.python.org/downloads ...

  5. am335x在ubuntu下使用StarterWare编写裸机程序并在CCS中用Jlink调试

    StarterWare在AM335X上的烧录运行 步骤:1.下载安装StarterWare,我们团购的SK需要02.00.00.07版本.最近外网访问慢,我上传到论坛.2.找一张miniSD卡,不需要 ...

  6. JavaScript遍历table

    JavaScript遍历table 1.说明      遍历表格中的某行某列,并打印其值 2.实现源码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML ...

  7. ReferenceError: Error #1065: 变量 dataGridArray 未定义

    1.错误描述 ReferenceError: Error #1065: 变量 dataGridArray 未定义. at global/flash.utils::getDefinitionByName ...

  8. Django学习-12-模板继承

    对于一下3个HTML页面         url(r'^templates1/', views.templates1),         url(r'^templates2/', views.temp ...

  9. IOS开发之XCode学习012:Slider和ProgressView

    此文学习来源为:http://study.163.com/course/introduction/1002858003.htm 此工程文件实现功能:  1.定义UISlider和UIProgressV ...

  10. 在.Net Core中使用MongoDB的入门教程(二)

    在上一篇文章中,讲到了MongoDB在导入驱动.MongoDB的连接,数据的插入等. 在.Net Core中使用MongoDB的入门教程(一) 本篇文章将接着上篇文章进行介绍MongoDB在.Net ...