不能在同一张表中将查询非结果集作为更新条件执行
将需要的结果集外层套一层自查询如
update a set a.num=a.num+1 where a.name in (select a.age from a where xx=xxx) ;
报错 [1093] You can't specify target table 'score' for update in FROM clause
update a set a.num=a.num+1 where a.name in (select b.age from(select a.age from a where xx=xxx)AS b) ;
这里的b作为别名再查一遍即可
标签:target,语法错误,1093,clause,update,num,table,where,select From: https://www.cnblogs.com/caoaman/p/17343635.html