MYSQL #1093 - You can't specify target table 'dealer_admin' for update in FROM clause
2011-03-23 17:19
288 查看
目前在写程序时,在处理MYSQL时遇到一个问题,问题如下
此时会报:#1093 - You can't specify target table 'dealer_admin' for update in FROM clause
在网上找了一个暂时可以解决的方法
update dealer_admin set is_super_admin=1 where id in (select id from dealer_admin group by dealer_id );
此时会报:#1093 - You can't specify target table 'dealer_admin' for update in FROM clause
在网上找了一个暂时可以解决的方法
create temporary table tmp (id int); insert into tmp (id) select id from dealer_admin group by dealer_id; update dealer_admin set is_super_admin=1 where id in (select id from tmp);
相关文章推荐
- MYSQL 临时表 #1093 - You can't specify target table 'dealer_admin' for update in FROM clause
- MySQL中执行sql语句错误 Error Code: 1093. You can't specify target table 'car' for update in FROM clause
- MySQL [Err] 1093 - You can't specify target table 'test' for update in FROM clause
- ERROR 1093 (HY000): You can't specify target table 'bm_area' for update in FROM clause
- mysql中错误:1093-You can’t specify target table for update in FROM clause的解决方法
- mysql中错误:1093-You can’t specify target table for update in FROM clause的解决方法
- ERROR 1093 (HY000): You can't specify target table 'SDS' for update in FROM clause
- 数据库删除重复属性列,错误[HY000][1093] You can't specify target table 'orders' for update in FROM clause
- [Err] 1093 - You can't specify target table 'ExtraPrivilege' for update in FROM clause
- mysql Error Code: 1093. You can't specify target table 'base_extend' for update in FROM clause 0.001
- [Err] 1093 - You can't specify target table 's1_test' for update in FROM clause
- MYSQL 1093 - You can't specify target table '' for update in FROM clause
- [Err] 1093 - You can't specify target table 'matorder' for update in FROM clause 原句:delete from mat
- 关于mysql 5.7版本“报[Err] 1093 - You can't specify target table 'XXX' for update in FROM clause”错误的bug
- 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删除数据时Error Code: 1093. You can't specify target table '表名' for update in FROM clause
- [Err] 1093 - You can't specify target table 'exam_arrange_list' 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 's' for update in FROM clause