shaolin_gungfu has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have a little MySQL database - actually it's not that little, it has about 252,000 records in it. The trouble is many of these records contain duplicate information. I need to analyse each record and remove this duplicate information.
Obviously each record has it's own unique primary key, but I need to compare say 5 out of the total of 9 fields in each record and if they contain duplicate information, just drop the one.
Now I could do this by taking record 1, looping in perl and comparing it to every other record, then when I find one that matches, drop that record. But that would take ages!!!
I was just wondering if anyone knew a cool, quick and easy MySQL command that would do it for me...?<?p>
MySQL seems to be good at stuff like that.
Your hopefully,
Tom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Removing duplicates in MySQL
by ferrency (Deacon) on May 01, 2002 at 14:58 UTC | |
by tommyw (Hermit) on May 01, 2002 at 16:32 UTC | |
|
Re: Removing duplicates in MySQL
by tommyw (Hermit) on May 01, 2002 at 15:00 UTC |