标签:for use target 一起 class 一个 person 操作 问题
DELETE FROM Persons WHERE Id NOT IN (SELECT MIN(Id)AS id FROM Persons GROUP BY Email) ;
You can‘t specify target table ‘Person‘ for update in FROM clause
问题出现:同一个表里删除操作 和查询连同一起了
把后半句
(SELECT MIN(Id)AS id FROM Persons GROUP BY Email)
改
(select * from (SELECT MIN(Id)AS id FROM Persons GROUP BY Email)temp )
You can't specify target table 'Person' for update in FROM clause
标签:for use target 一起 class 一个 person 操作 问题
原文地址:https://www.cnblogs.com/tk55/p/13219383.html