转发于: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. FusionCharts 2D柱状图和折线图的组合图

    1.设计思路 (1)了解组合图的特性以及用法,选用图的类型: (2)设计出两根柱子和两根折线,分开展示. 2.设计步骤 (1)设计页面 Column2DLine.html: <!DOCTYPE ...

  2. bootstrap 幻灯大图结合dedecms的autoindex

    <div class="container" id="banner"> <div id="carousel-example-gene ...

  3. hi3531调用sil9024的驱动

    //测试mao  printf("\n\n");    unsigned int cmd=1;    unsigned long arg =4;  fd = open(" ...

  4. offline页面开发常用方法及页面控件验证

    offline页面开发常用方法及页面控件验证,对一些CheckBoxList操作进行封装,新人可以直接使用该代码. 1.返回上一页网址 /// <summary> /// Descript ...

  5. 一个完整的springmvc + ajaxfileupload实现图片异步上传的案例

    一,原理 详细原理请看这篇文章 springmvc + ajaxfileupload解决ajax不能异步上传图片的问题.java.lang.ClassCastException: org.apache ...

  6. 【原】关于定时回查出现的BUG有感

    前言:今天有同事反映说客户在平台投标后,看到的是失败状态,但是钱在某银行的状态是被冻结了,我这边给出答复是只有投标成功才会冻结. 首先写下流程:P2P对接某银行托管,某银行的部分接口要求我们通过同步回 ...

  7. HALCON学习-下载、安装

    下载地址: 官网 HALCON学习网 安装: 直接安装文件halcon-12.0-windows-x86.exe 破解,汉化: 在HALCON学习网中有Licence文件“license_suppor ...

  8. java实现中文分词

    IK Analyzer是基于lucene实现的分词开源框架 下载路径:http://so.csdn.net/so/search/s.do?q=IKAnalyzer2012.jar&t=doc& ...

  9. 第十篇:K均值聚类(KMeans)

    前言 本文讲解如何使用R语言进行 KMeans 均值聚类分析,并以一个关于人口出生率死亡率的实例演示具体分析步骤. 聚类分析总体流程 1. 载入并了解数据集:2. 调用聚类函数进行聚类:3. 查看聚类 ...

  10. 【BZOJ2132】圈地计划(最小割)

    [BZOJ2132]圈地计划(最小割) 题面 BZOJ 题解 对我而言,不可做!!! 所以我膜烂了ZSY大佬 他的博客写了怎么做... 这,,...太强啦!! 完全想不到黑白染色之后反着连边 然后强行 ...