This mostly happens when you import data sources from out side(CSV,EXCEL,SQL)
Following code will show you how to find duplicates,
select count(*) as num, ID, Name from table
group by ID,Name
having count(*) > 1
This code will group the given column and see if the grouped columns have more than one record
+-----+------+------------+
| num |ID | Name |
+-----+------+------------+
| 3 | 1 | Kuppiya |
+-----+------+------------+
| 2 | 3 | Apple |
+-----+------+------------+

Simple, but effective - thanks very much
ReplyDelete