转发于: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. 摘抄--全面理解面向对象的 JavaScript

    全面理解面向对象的 JavaScript JavaScript 函数式脚本语言特性以及其看似随意的编写风格,导致长期以来人们对这一门语言的误解,即认为 JavaScript 不是一门面向对象的语言,或 ...

  2. ASP.NET CORE的Code Fist后Models更改了怎么办?

    上次我写到MVC的code fist后,自动生成数据库并自动生成web页面了 点击打开链接 那么随着项目需求的逐步明确,model变化了怎么办呢?其实和上次一样的,有两条关键的语句要记住 Add-Mi ...

  3. 【Java入门提高篇】Day14 Java中的泛型初探

    泛型是一个很有意思也很重要的概念,本篇将简单介绍Java中的泛型特性,主要从以下角度讲解: 1.什么是泛型. 2.如何使用泛型. 3.泛型的好处. 1.什么是泛型? 泛型,字面意思便是参数化类型,平时 ...

  4. iOS - Core Animation 核心动画的使用

    1.简单使用示例 1.1 时钟 QClockView.h @interface QClockView : UIView /// 创建时钟界面 + (instancetype)q_clockViewWi ...

  5. JavaScript的作用域详解。

    首先讲原理,大家都知道JS是逐行执行,首先进入作用域只有有两种方式:  1.当看到script标签的时候,进入到作用域,也就是内置的<script></script>     ...

  6. javascript学习记录-2-18

    对象定义的几种方法: var  person=new Object(); person.name="111"; person.age=22; 或 var person={   na ...

  7. KMP算法 Next数组详解

    题面 题目描述 如题,给出两个字符串s1和s2,其中s2为s1的子串,求出s2在s1中所有出现的位置. 为了减少骗分的情况,接下来还要输出子串的前缀数组next.如果你不知道这是什么意思也不要问,去百 ...

  8. 【BZOJ1305】跳舞(网络流)

    [BZOJ1305]跳舞(网络流) 题面 Description 一次舞会有n个男孩和n个女孩.每首曲子开始时,所有男孩和女孩恰好配成n对跳交谊舞.每个男孩都不会和同一个女孩跳两首(或更多)舞曲.有一 ...

  9. 【CJOJ2498】【DP合集】最长上升子序列 LIS

    题面 Description 给出一个 1 ∼ n (n ≤ 10^5) 的排列 P 求其最长上升子序列长度 Input 第一行一个正整数n,表示序列中整数个数: 第二行是空格隔开的n个整数组成的序列 ...

  10. [Luogu4230]连体病原体

    题面戳我 sol 很好想+很好写的一道题,然而比赛中我还是没有切掉qaq. LCT 枚举左端点\(i\),向右移动右端点指针\(j\)找到第一个成环的位置.此时\([i,j],[i,j+1]...[i ...