I have a mysql table. How do I remove partial duplicates based on three columns? Is it posibble to apply the changes to the current table? If not what is the solution?
Example:
The current table
Surname………First Name…….Company Name……..Responsibilities…….Column5
McKain……………Christine………XYZ………………………….A…………………………..A
McKain………. ….Christine ………XYZ ………………………..B…………………………. B
Morrell…………… Sally …………..ABC …………………………A ………………………….A
Motu ………………Timothy……….. EFG ………………………..I …………………………..I
The resulting Table:
Surname………First Name…….Company Name……..Responsibilities…….Column5
McKain……………Christine………XYZ………………………….A…………………………..A
Morrell…………… Sally …………..ABC …………………………A ………………………….A
Motu ………………Timothy……….. EFG ………………………..I …………………………..I
and if possible someone please tell me an easy way to add a table here in stack overflow..
Replace tableName with your table’s name and the GROUP BY/UNIQUE INDEX fields with the fields you want to be unique.
Warning: The GROUP BY used will only select the first entry when removing duplicates.
If something goes wrong, you still have a copy of your original data in tableName_old.