Jump to content

Archived

This topic is now archived and is closed to further replies.

SharkBait

Search through Duplicates

Recommended Posts

Is it possible to do a query to find out all the duplicates in a table?

I need to change a field to a unique and if I do that and it finds some duplicates is just stops at the first duplicate.

I need to get rid of the duplicates and there are roughly 176,000 records to go through :)

Share this post


Link to post
Share on other sites
Sure: SELECT yourField, COUNT(*) AS cnt FROM yourTable GROUP BY yourField HAVING cnt > 1

Share this post


Link to post
Share on other sites
Cool, is there a way to delete the duplicate items without deleting all of it?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.