Mysql You can't specify target table 'newsalrecord' for update in FROM clause
这个问题是不能先select出同一表中的某些值,再update这个表(在同一语句中),即不能依据某字段值做判断再来更新某字段的值。
解决办法就是建立个临时的表。

Mysql You can't specify target table 'newsalrecord' for update in FROM clause的更多相关文章
- Mysql -- You can't specify target table 'address' for update in FROM clause
做地址管理时,需要先根据要设为默认的地址的用户将用户的其他地址都设置为非默认 需要select出用户id然后update 原语句 update address set isdeafult = 0 wh ...
- mysql You can't specify target table 'sys_org_relation' for update in FROM clause 删除表条件不能直接包含该表
mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表( ...
- mysql You can't specify target table 'xxx' for update in FROM clause的解决
DELETE from sp_goodscontent where goodsId in (SELECT t.goodsId from ( SELECT goodsId FROM sp_goodsco ...
- mysql You can't specify target table 'xxx' for update in FROM clause
含义:您不能在子句中为更新指定目标表'xxx'. 错误描述:删除语句中直接含select,如下: DELETE FROM meriadianannotation WHERE SeriesID IN ( ...
- mysql You can't specify target table 'sys_right_menu' for update in FROM clause (不能从Objor子句中指定目标表“SysRyType菜单)
错误语句: DELETE from sys_right_menu where right_id in (SELECT m.right_id from sys_right_menu mLEFT JO ...
- mysql中更新或者删除语句中子语句不能操作同一个表You can't specify target table 'test' for update in FROM clause
问题描述:有个数据表test,有个字段value,如下 mysql> select * from test;+----+------------------------------------+ ...
- Mysql update in报错 [Err] 1093 - You can't specify target table 'company_info' for update in FROM clause
Mysql update in报错 解决方案: [Err] 1093 - You can't specify target table 'company_info' for update in FRO ...
- MySQL中执行sql语句错误 Error Code: 1093. You can't specify target table 'car' for update in FROM clause
MySQL中执行sql语句错误 Error Code: 1093. You can't specify target table 'car' for update in FROM clause 201 ...
- 关于mysql 5.7版本“报[Err] 1093 - You can't specify target table 'XXX' for update in FROM clause”错误的bug
不同于oracle和sqlserver,mysql并不支持在更新某个表的数据时又查询了它,而查询的数据又做了更新的条件,因此我们需要使用如下的语句绕过: , notice_code ) a) ; 本地 ...
随机推荐
- R在ubuntu16.04上环境搭建
1.R安装 sudo apt-get update sudo apt-get remove vim-common sudo apt-get install vimapt-cache show r-ba ...
- 基于小熊派Hi3861鸿蒙开发的IoT物联网学习【一】
基于小熊派鸿蒙季BearPi-HM_Nano HarmonyOS 鸿蒙系统Hi3861开发板NFC 开发步骤:1.购买开发板:某宝上购买就行 2.安装开发环境 3.下载源码 4.编写案例并执行 开发 ...
- Drupal Drupalgeddon 2 远程代码执行漏洞(CVE-2018-7600)
影响版本 Drupal 6.x,7.x,8.x Drupal 是一款用量庞大的CMS,其6/7/8版本的Form API中存在一处远程代码执行漏洞 脚本检测
- Jmeter分布式压测实战及踩坑处理(含参数化)
项目中使用Jmeter进行大并发压测时,单机受限内存.CPU.网络IO,会出现服务器压力还没有上 去,但压测服务器由于模拟的压力太大死机的情况.JMeter的集群模式可以让我们将多台机器联合起来 一起 ...
- Azure安装完postgresql遇到:psql: error: could not connect to server: FATAL: no pg_hba.conf entry for host
进入创建好的Azure Database for PostgreSQL server 点击connection security 在Firewall rules中 Add 0.0.0.0-255.2 ...
- 题解CF757B
题目 题意:在 \(s\) 数组中找出尽可能多的数使得他们的最大公约数 \(>1\) 既然最大公约数 \(>1\),\(s\) 数组的值域是 \(1 \le s_i \le 10^5\), ...
- Android程序员提加薪被拒,刷2000题跳槽涨薪50%!
为什么想跳槽? 简单说一下当时的状况,我在这家公司做了两年多,这两年多完成了一个大项目,作为开发的核心主力,开发压力很大,特别是项目上线前的几个月是非常辛苦,几乎每晚都要加班到12点以后,周末最多只有 ...
- Spring学习笔记--面向切面编程(AOP)
什么是AOP AOP(Aspect Oriented Programming),意为面向切面编程,通过预编译方式和运行期间动态代理实现程序功能的统一维护的一种技术.AOP是OOP的延续,是软件开发中的 ...
- Vue实现多文件上传功能(前端 + 后端代码)
本人业余前端开发,因为公司(很坑)觉得我很牛逼,所以让我前后端一起玩,无奈的我只能磕磕碰碰的研究起了vue. 开发项目的时候,用到文件上传的功能很常见,包括单文件上传和多文件上传,上传各种类型的文件. ...
- 在线文本的编辑框——kindeditor富文本编辑的使用
.personSunflowerP { background: rgba(51, 153, 0, 0.66); border-bottom: 1px solid rgba(0, 102, 0, 1); ...