错误原因
在同一语句中。不能先SELECT出同一表的某些值,在Update这个表
实例
错误实例
DELETE
FROM dupes
WHERE id NOT IN (SELECT MIN(id)
FROM dupes
GROUP BY name)
正确实例
DELETE
FROM dupes
WHERE id NOT IN (SELECT * FROM (SELECT MIN(id) FROM dupes GROUP BY name) z);
标签:GROUP,target,1093,clause,dupes,MIN,实例,id,SELECT
From: https://www.cnblogs.com/leoych/p/17874508.html