How to delete duplicated rows from table

amator

Registered User.
Local time
Today, 04:28
Joined
Aug 1, 2006
Messages
23
Hi
I have to make a query which deletes duplicate rows from my table. How I should start to make it? Can I do it whit one query or does this operation needs more queries? I know that DISTINCT works but how I can set it to DELETE operation?
I have try to use command DELETE DUPLICATES FROM Table; but this command deletes all rows from table why?
 
Last edited:
Basically it sounds your original table is not constructed correctly with necessary Primary key and relevant index's

One way would be to use a select distinct as a make table query

Rename the original table as something_old and your new table to the original name.

You now have a new table with distinct entries. Do not delete teh old table until you are certain youhave a correct set of data

Take steps to prevent duplication in the new table

L
 

Users who are viewing this thread

Back
Top Bottom