[Err] 1093 - You can't specify target table 'table' for update in FROM clause处理
来源:互联网 发布:软件测试计划的目的 编辑:程序博客网 时间:2024/05/17 08:53
现在有这样的一张表img_style,表示图片的类型
IS_IDIS_NameIS_TypeIS_StateIS_Time1生日派对112016-07-26 15:15:582开业年会212016-07-26 15:15:583婚礼312016-07-26 15:15:584促销412016-07-26 15:15:58现在要插入一条新数据,要求IS_Type也需要递增
INSERT INTO img_style (IS_Name,IS_Type,IS_State,IS_Time) VALUES ('aaaa',(SELECT COUNT(1) FROM img_style)+1,1,NOW());
报错[Err] 1093 - You can't specify target table 'img_style' for update in FROM clause
我觉得大致的意思应该是你不能调用已经在sql语句中的原表进行操作,需要新开一个临时表
修改sql语句如下
INSERT INTO img_style (IS_Name,IS_Type,IS_State,IS_Time) VALUES ('aaaa',(SELECT COUNT(1) FROM img_style a)+1,1,NOW());
笔记只用。
1 0
- [Err] 1093 - You can't specify target table 'table' for update in FROM clause处理
- [Err] 1093 - You can't specify target table 's' for update in FROM clause
- [Err] 1093 - You can't specify target table 'image' for update in FROM clause
- MySQL数据库update更新子查询[Err] 1093 - You can't specify target table 'text' for update in FROM clause
- [Err] 1093 - You can't specify target table 'matorder' for update in FROM clause 原句:delete from mat
- 【MySQL】1093 You can't specify target table 'table name' for update in FROM clause
- MYSQL 临时表 #1093 - You can't specify target table 'dealer_admin' for update in FROM clause
- ERROR 1093 (HY000): You can't specify target table 'b' for update in FROM clause
- [Django](1093, "You can't specify target table 'fee_details_invoices' for update in FROM clause") 错误
- MYSQL 1093 - You can't specify target table '' for update in FROM clause
- #1093 - You can't specify target table 'user' for update in FROM clause
- ERROR 1093 (HY000): You can't specify target table 'SDS' for update in FROM clause
- MySQL 错误码: 1093 You can't specify target table 'jc_user' for update in FROM clause
- mysql错误:1093-You can’t specify target table for update in FROM clause的解决方法
- You can't specify target table 'table name' for update in FROM clause
- MySql报错: You can't specify target table 'table name' for update in FROM clause
- mysql update语句问题:You can't specify target table 'user' for update in FROM clause
- You can't specify target table 't' for update in FROM clause
- io
- POJ-1679 The Unique MST
- 策略模式
- backup incremental level 1 database
- php 防注入的一些总结
- [Err] 1093 - You can't specify target table 'table' for update in FROM clause处理
- 【算法】二分查找——与答案进行比较的思维
- 网易实习生笔试编程题 二叉树
- 配置机房数据库
- RxJava入门——概念篇
- 百度移动统计的使用
- linux中动态库和静态库
- ARC修饰符----__unsafe_unretained修饰符
- JavaMail(2)邮件发送和接收