Mysql中如何解决You can't specify target table '表名' for update in FROM clause报错
为什么会出现这个错误呢?这是因为在MySQL使用时,在同一条SQL语句中,不允许先SELECT出同一个表的某些值,再对该表进行UPDATE操作。
解决方式
# Write your MySQL query statement below
delete from Person where id not in
(select id from(
select min(id) id from Person
group by email) temp);
标签:target,clause,Mysql,报错,表名,table,id
From: https://www.cnblogs.com/aclq/p/17832448.html