N-Bomb(Nerd) Posted May 29, 2009 Share Posted May 29, 2009 Is there a way I can check to see if there's any repeating values in one of my tables? Link to comment https://forums.phpfreaks.com/topic/160176-checking-my-database/ Share on other sites More sharing options...
Maq Posted May 29, 2009 Share Posted May 29, 2009 Sure, can you post what values you want to check and your table structure? Link to comment https://forums.phpfreaks.com/topic/160176-checking-my-database/#findComment-845111 Share on other sites More sharing options...
N-Bomb(Nerd) Posted May 29, 2009 Author Share Posted May 29, 2009 my table structure: id, i, name Since `i` is unique to each name, I should only have to check `i` to see if there's any repeating of that value. Link to comment https://forums.phpfreaks.com/topic/160176-checking-my-database/#findComment-845116 Share on other sites More sharing options...
Maq Posted May 29, 2009 Share Posted May 29, 2009 Try: SELECT i, COUNT(*) as num FROM table GROUP BY i HAVING num > 1 Link to comment https://forums.phpfreaks.com/topic/160176-checking-my-database/#findComment-845154 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.