-2
我用下面的查询来更新MYSQL行:无法使用子查询
update city
set CountryCode = (select CountryCode from city where id = 1)
where id =4081;
和我得到了以下错误:
Error Code: 1093. You can't specify target table 'city' for update in FROM clause
,但我不知道这是为什么不允许我这样做?
-1花费0时google搜索解决方案。 – 2014-08-28 13:36:50
可能重复的[Mysql错误1093 - 无法指定目标表更新FROM子句](http://stackoverflow.com/questions/45494/mysql-error-1093-cant-specify-target-table-for-更新功能于从子句) – 2014-08-28 13:37:00