【发布时间】:2014-03-12 05:27:42
【问题描述】:
update table1
set isDeleted = 1
where isDeleted = 0
and mId in (select id from table1 where isDeleted = 1 );
错误代码:1093。您不能在 FROM 子句中指定目标表 'table1' 进行更新
【问题讨论】:
-
table1 id midsalary 1 null 10000 2 1 8000 3 1 8000 4 2 6000 update table1 set mid = t2.mid where mId in (select id from table1 as t2 where t2.mid is not null ) ;
标签: mysql