/* CREATE a TABLE */drop table if exists 'test'; create table if not exists 'test' ('id' INT (1) not null AUTO_INCREMENT, 'name' VARCHAR (20) not null, 'add' VARCHAR (20) not null, primary key ('id') ENGINE = INNODB; /* INSERT test Data */insert into 'test' ('name', 'add') VALUES ('abc', "123"), ('abc ', "123"), ('abc', "321"), ('abc', "123"), ('xzy ', "123"), ('xzy ', "456"), ('xzy ', "456"), ('xzy', "456"), ('xzy ', "789"), ('xzy ', "987"), ('xzy ', "789"), ('ijk', "147"), ('ijk ', "147"), ('ijk ', "852"), ('opq', "852"), ('opq', "963"), ('opq', "741"), ('tpk ', "741"), ('tpk', "963"), ('tpk', "963"), ('qq', "546"), ('qq ', "546"), ('Once ', "546");/× Method for deleting duplicate data ×/DELETE 'test' FROM test, (select distinct min ('id ') AS 'id', 'name', 'add' FROM 'test' group by 'name', 'add' having count (1)> 1) AS 'test2' WHERE 'test '. 'name' = 'test2 '. 'name' AND 'test '. 'add' = 'test2 '. 'add' AND 'test '. 'id' <> 'test2 '. 'id ';
I feel this is reliable.