You can't specify target table for update in FROM clause含义:不能在同一表中查询的数据作为同一表的更新数据。

将sql语句

UPDATE RES_CATALOG_CLASSIFY
SET CATALOG_SORT = CATALOG_SORT + 1
WHEREID = (SELECTIDFROM`res_catalog_classify`WHEREPARENT_ID = '001'AND CATALOG_SORT = 7)

改为

UPDATE RES_CATALOG_CLASSIFY
SET CATALOG_SORT = CATALOG_SORT + 1
WHEREID = (SELECT a.ID FROM (SELECTIDFROM`res_catalog_classify`WHEREPARENT_ID = '001'AND CATALOG_SORT = 7) a)

就可以了

转载于:https://www.cnblogs.com/cailijuan/p/9914036.html

mysql更新表数据时报错 You can't specify target table 'RES_CATALOG_CLASSIFY' for update in FROM clause...相关推荐

  1. Mysql删除重复数据并解决You can't specify target table 'xx' for update in FROM clause 报错与 query interrupted报错

    哇,这个问题在纠结了N个小时总算解决了! 解决方案: -- 在命令行方式中输入 delete from 表名 where id in (select id from (select id from 表 ...

  2. MySQL 修改报错 You can't specify target table 'tb_trade' for update in FROM clause

    修改前 delete from tb_order where tradeId in ( select o.tradeId from tb_order o INNER JOIN tb_trade t w ...

  3. mysql实战(五)—— You can‘t specify target table ‘org_department‘ for update in FROM clause

    系列文章目录 You can't specify target table 'org_department' for update in FROM clause 系列文章目录 背景 具体实现过程 1. ...

  4. MySQL||SQL_ERROR_INFO: “You can‘t specify target table ‘titles_test‘ for update in FROM clause“

    一.问题描述 假定test数据库存在表titles_test,表内数据如下: 先要求删除emp_no重复的记录,只保留最小的id对应的记录.编写代码如下: delete from titles_tes ...

  5. 【MySQL】Error Code: 1093. You can‘t specify target table ‘xxx‘ for update in FROM clause

    1. 报错信息: Error Code: 1093. You can't specify target table 'self_check' for update in FROM clause 错误的 ...

  6. MySQL 语法问题:You can‘t specify target table ‘xxx‘ for update in FROM clause. 原因及解决方法

    报错信息如下: [Code: 1093, SQL State: HY000] You can't specify target table 'bd_bankaccbas' for update in ...

  7. Mysql语句提示You can't specify target table 'XXX' for update in FROM clause解决方案

    错误提示:You can't specify target table 'XXX' for update in FROM clause 不能从子句中指定更新表的目标表"XXX" 原 ...

  8. MySQL [1093] You can‘t specify target table ‘titles_test‘ for update in FROM clause

    执行以下语句: delete from titles_test where id not in(select min(id)from titles_testgroup by emp_no); 会报出错 ...

  9. 【mysql 】sql错误代码 1093 You cannot specify target table xxxx for update in FROM clause

    在mysql8.X中执行如下语句: DELETE FROM`test`.unsign_wocode WHEREid IN (SELECTa.id FROM`test`.unsign_wocode a, ...

最新文章

  1. JAVA入门级教学之(方法-4)
  2. mac mongodb可视化工具_github项目推荐|2019 冠状病毒疫情爬虫。疫情数据可视化
  3. tree(2018.10.26)
  4. 什么是koa中间件,他们的执行顺序是什么样的?
  5. _tkinter.TclError: invalid command name “tixComboBox“ 的解决办法
  6. Android无界面编程之使用Service
  7. 计算机启动与故障修复工具,Windows7异常启动的故障修复
  8. 编程坑太多,Map 集合怎么也有这么多坑?一不小心又踩了好几个!
  9. linux su 拒绝权限,Linux禁止非WHEEL用户使用su命令
  10. 脑语言2500令v0.5.5
  11. Python:7-1 温度转换 (6分)
  12. 李智慧 - 架构师训练营 第二周
  13. like语句太慢 sqlserver_MySQL Like模糊查询速度太慢如何解决
  14. 用Xenu检查死链发现域名后有//
  15. 微信多开防撤回工具再也不用担心好友撤回消息和登录多个账号了
  16. 一段神奇的代码-关于PHP字符变量奇怪现象的解释
  17. 【MagNet】《Progressive Semantic Segmentation》
  18. excel向程序发送命令时出现错误
  19. 计算机屏幕尺寸像素点距概念,各种电脑显示器尺寸对应的最佳分辨率大小是多少...
  20. Android studio基础练习07【获取手机通讯录】

热门文章

  1. 汇编语言之8086/8088指令系统
  2. (四)electron尝试使用win32 API——node-gpy到底是干嘛的?
  3. EasyDSS流媒体服务器出现no compatible source was found for this media问题的解决
  4. ESP8266 安信可一体化开发环境 Windows + Cygwin + Eclipse + GCC 的安装及说明
  5. 时空序列预测:SimVP: Simpler yet Better Video Prediction解读
  6. ETAS代表博世成为Eclipse软件定义汽车工作组的战略成员
  7. 高通charge杂记
  8. 5G网络及安全能力开放技术研究
  9. 2021年全国职业院校技能大赛(中职组)网络安全竞赛试题(9)思路
  10. 核心功能全部开源,虽霸榜GitHub,但怎么赚钱?