I've used this code to select the duplicate rows, it went right,
SELECT name, COUNT(name)
FROM emp
GROUP BY name
HAVING COUNT>1;
But it doesn't help me in deleting the same selected rows....
DELETE emp
WHERE name IN ( SELECT name, COUNT(name)
FROM emp
GROUP BY name
HAVING COUNT >1);