mysql中You can't specify target table for update in FROM clause错误
来源:互联网 发布:淘宝特卖网qitemei 编辑:程序博客网 时间:2024/05/29 16:25
mysql中You can’t specify target table for update in FROM clause错误意思你不可以对某个表现进行select,然后根据select出来的值再进行操作。比如:
update tbl tset t.name = 'xxx'where id in ( select max(id) from tbl a where EXISTS ( select 1 from tbl b where a.tac=b.tac group by xx ) group by xx)
解决方案是对select出来的结果进行一次包装:如下
update tbl tset t.name = 'xxx'where id in ( select * from ( select max(id) from tbl a where EXISTS ( select 1 from tbl b where a.tac=b.tac group by xx ) group by xx ) tmp)
这样就ok了
阅读全文
0 0
- mysql中You can't specify target table for update in FROM clause错误
- mysql中You can't specify target table for update in FROM clause错误
- mysql中You can't specify target table for update in FROM clause错误
- mysql中You can't specify target table for update in FROM clause错误
- mysql中You can't specify target table for update in FROM clause错误 转
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- mysql中You can\'t specify target table for update in FROM clause错误
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- mysql中You can't specify target table for update in FROM clause错误
- mysql 中 You can't specify target table <tbl> for update in FROM clause 错误解决方法
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- mysql中You can't specify target table for update in FROM clause错误
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- mysql中You can't specify target table for update in FROM clause错误
- mysql中You can't specify target table for update in FROM clause错误
- mysql中You can't specify target table for update in FROM clause错误
- mysql中You can't specify target table for update in FROM clause错误
- 5-13 词频统计 (30分)
- 利用BlurMaskFilter实现具有阴影效果的Imageview
- mysql --- union
- 二叉树的建立与遍历【模板】
- 安卓 运行、调试 配置 android Run/debug configurations
- mysql中You can't specify target table for update in FROM clause错误
- Java进阶书籍推荐
- pscp使用
- Innosetup 将文件安装到system32 、syswow64下
- 看2017年的最新数据:哪种编程语言才是真正的王者?
- win7 一些UAC相关的问题
- 为什么写的html中的中文是乱码?
- 前端开发app,从hbuilder开始
- HTML5_video视频