mercredi 5 août 2015

How to remove duplicate rows from a mysql table


I have a table with a large number of columns. Say, the table has 1000 columns from 'col1' to 'col1000'.

For duplicate criteria I don't want to use 'col1' and 'col1000'. So, if in any row values for 'col2' to 'col999' have already occurred, they are duplicates.

I tried the solution given here http://ift.tt/1IGVjOs but this requires me to explicitly write all the columns I am considering for duplicates. I can't write 998 columns.

Can somebody please help me with the query in deleting such duplicates?

I want to delete such duplicates in a multiple tables.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire