mysql报Table 'XXX' is specified twice, both as a target for 'UPDATE'....
2018-01-27 00:00
681 查看
今天在执行这样一条语句
mysql跑出来这样子一个错误
Table 'CarModel' is specified twice, both as a target for 'UPDATE' and as a separate source for data
改成这个就可以了
update CarModel set status=0 where id in( select m.id from CarModel m where type='cs' and NOT EXISTS(select c.modelId from Car c where c.modelId=m.id))
mysql跑出来这样子一个错误
Table 'CarModel' is specified twice, both as a target for 'UPDATE' and as a separate source for data
改成这个就可以了
update CarModel set status=0 where id in( select * from (select m.id from CarModel m where type='cs' and NOT EXISTS(select c.modelId from Car c where c.modelId=m.id)) as temp)
相关文章推荐
- Mysql: Table name is specified twice, both as a target for UPDATE and as a separate source for data
- Mysql: Table 'name' is specified twice, both as a target for 'UPDATE' and as a separate source for data
- 硬盘空间满导致mysql ibd文件被删后提示Tablespace is missing for table 'db_rsk/XXX"
- You can't specify target table 'xxx' for update in FROM clause
- MySQL 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错误解决方法
- You can't specify target table 'XXX' for update in FROM clause
- mysql错误:Table XXX is marked as crashed and should be repaire
- 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 ‘abc’ for update in FROM clause
- Mysql错误:Table 'xxx'is marked as crashed and should be repaired
- Mysql 错误 Code: 1093. You can't specify target table for update in FROM clause
- You can't specify target table 'test' for update in FROM clause.
- MySQL:Table XXX is marked as crashed and should be repaired
- mysql Error Code: 1093. You can't specify target table 'base_extend' for update in FROM clause 0.001
- 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错误 转