Selecting duplicate mysql values

ii silver ii

ǝɹıɟpǝʞɔı&
Dec 18, 2008
767
23
0
If I have a table contain data like the following example..

tableu.png


and I want to select the highlighted rows because they are duplicates (values are the same apart from id)

then how could/would I do this?

My end aim is to select rows 1,3,4,5,9,10 for deletion and then put proper indexes on the table.
 


thanks, for future reference this worked for 3x columns..

Code:
SELECT `name`, COUNT(`name`), `value`, COUNT(`value`), itemId, COUNT(itemId)
FROM itemCat 
GROUP BY `name`, `value`, itemId 
HAVING (COUNT(`name`) > 1) AND (COUNT(`value`) > 1) AND (COUNT(itemId) > 1)