I wanted to
display the duplicate values - anyway I got a workaround using HAVING. But I wanted the id also to be displayed alongside each duplicate entry.
The following query would return 50 rows - say there are 2 duplicates for each row (COUNT(`col1`) being 2 for each row) - but I was hopin for a solution to return 100 rows, id, col1.
Code:
SELECT `col1`, COUNT(`col1`)
FROM `tbl1`
GROUP BY `col1`
HAVING COUNT(`col1`) > 1
Thanks anyway,