Mysql: Table name is specified twice, both as a target for UPDATE and as a separate source for data
2018-02-27 14:25
495 查看
执行SQL:
update table1 set status2=1 where id IN( select max(id) from table1 where cid=1 group by link) ;
出现错误:
Mysql: Table name is specified twice, both as a target for UPDATE and as a separate source for data
将SQL修改为:
update table1 set status2=1 where id IN(select * from ( select max(id) from table1 where cid=1 group by link) as TEMP ) ;
update table1 set status2=1 where id IN( select max(id) from table1 where cid=1 group by link) ;
出现错误:
Mysql: Table name is specified twice, both as a target for UPDATE and as a separate source for data
将SQL修改为:
update table1 set status2=1 where id IN(select * from ( select max(id) from table1 where cid=1 group by link) as TEMP ) ;
相关文章推荐
- Mysql: Table 'name' is specified twice, both as a target for 'UPDATE' and as a separate source for data
- mysql报Table 'XXX' is specified twice, both as a target for 'UPDATE'....
- MySQL错误:You can't specify target table 'tablename' for update in FROM clause
- mysql: "tablename" is marked as crashed and should be repaired修复 问题分析: 当mysql出现这类提示时,大部分的现象为查询不到正常的
- MySQL:Table XXX is marked as crashed and should be repaired
- mysql表修复问题---(table is marked as crashed and should be repaired)
- mysql中You can't specify target table for update in FROM clause错误
- mysql错误:1093-You can’t specify target table for update in FROM clause的解决方法
- MySql Table错误:is marked as crashed and last (automatic?) 和 Error: Table "mysql"."innodb_table_stats" not found
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- MYSQL-Table is marked as crashed and last (automatic) re
- mysql错误:Table XXX is marked as crashed and should be repaire
- An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON
- 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错误的意思是说,不能先select出同一表中的某些值,再update这个表(在同一语句中)。
- table_name' is marked as crashed and last (automatic?) repair failed
- Mysql 出现 Table ‘xxx’ is marked as crashed and should be repaired 问题
- MySQL 去重修改 :You can't specify target table 's' for update
- MYSQL之You can't specify target table for update in FROM clause解决办法