nix, shell, perl, php, mysql and mac os x tips and tricks

Thursday, October 16, 2008

Find and delete duplicate records in MYSQL

DELETE t2 from table AS t1, table AS t2 WHERE t1.field = t2.field AND t2.id < t1.id

No comments:

Post a Comment