1
我知道这是一个简单的语法问题。试图从一个子查询中删除所有用户:MySQL:从IN中删除
delete from users
where id IN (
select u.id
from users u
where not exists (select * from stickies i where i.user_id = u.id)
group by u.email
having count(*) > 1
)
收到此错误:
error : You can't specify target table 'users' for update in FROM clause
子查询工作正常(用户ID的回报清单)。
嗯。令人不安。从这里得到的查询:http://stackoverflow.com/questions/4985183/mysql-find-duplicate-users-where-item-count-1 – jmccartie 2011-02-13 16:56:01