我正在MySQL 5.5中成功运行查询
SELECT columnA FROM table GROUP BY columnA HAVING count(*) > 1
但是,我需要使用DELETE运行相同的查询,但我不确定如何删除?即返回的结果应该删除?
有任何想法吗 ?
将其放在子查询中:
delete from table where columnA in ( select columnA from ( select columnA from YourTable group by columnA having count(*) > 1 ) t )