从MySql中删除重复的行

时间:2017-05-12 06:34:26

标签: mysql

这是我的mysqSql表。

getContentResolver().getType(theReceivedUri);

...

如何只删除重复的行?我有超过1万行,有很多重复。

1 个答案:

答案 0 :(得分:1)

试试这个

 DELETE a
FROM mytable  as a, mytable  as b
WHERE
  (a.m_mobile   = b.m_mobile )
AND (a.m_ReceiveFromBranch = b.m_ReceiveFromBranch )
AND a.ID < b.ID;