SharkBait Posted October 20, 2006 Share Posted October 20, 2006 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 :) Link to comment https://forums.phpfreaks.com/topic/24599-search-through-duplicates/ Share on other sites More sharing options...
fenway Posted October 22, 2006 Share Posted October 22, 2006 Sure: SELECT yourField, COUNT(*) AS cnt FROM yourTable GROUP BY yourField HAVING cnt > 1 Link to comment https://forums.phpfreaks.com/topic/24599-search-through-duplicates/#findComment-112775 Share on other sites More sharing options...
SharkBait Posted October 23, 2006 Author Share Posted October 23, 2006 Cool, is there a way to delete the duplicate items without deleting all of it? Link to comment https://forums.phpfreaks.com/topic/24599-search-through-duplicates/#findComment-113212 Share on other sites More sharing options...
fenway Posted October 24, 2006 Share Posted October 24, 2006 All of what? Link to comment https://forums.phpfreaks.com/topic/24599-search-through-duplicates/#findComment-113468 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.