在mysql中删除表中的重复数据

在mysql中删除表中的重复数据,mysql,Mysql,我不知道如何从表中删除所有重复的数据,也不知道我的表中哪些数据是重复的,我可以在Mysql中运行哪个查询,请帮助我 delete from tablename(record) where coluumnname(employer)=ram >0 它正在工作,但它从表中删除所有记录,通常不重复 delete from <table_name> where rowid not in ( select min(rowid)

我不知道如何从表中删除所有重复的数据,也不知道我的表中哪些数据是重复的,我可以在Mysql中运行哪个查询,请帮助我

delete from tablename(record) where coluumnname(employer)=ram >0
它正在工作,但它从表中删除所有记录,通常不重复

delete from <table_name> where rowid not in 
                       ( select min(rowid) 
                         from table group by column1..,column2,...column3..);

从记录中删除雇主class='ram'限制1

检查此链接,因为您已经删除了所有数据-使用唯一键重新创建表,这将不允许您插入重复项。
delete from table where employer not in 
   (select min(employer) from table group by employer order by 1);