-1

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

delete from tablename(record) where coluumnname(employer)=ram >0

它工作,但它从表中删除所有记录不重复

4

2 回答 2

1

一般来说..

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

在你的情况下

delete from table where employer not in 
   (select min(employer) from table group by employer order by 1);
于 2013-11-06T08:48:24.947 回答
0

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

于 2013-11-06T09:33:54.563 回答