MySQL check if value exist more than once
mysql
Solution
Ususlly you can do this using `GROUP BY` and `HAVING COUNT(*)>1`
SELECT USERNAME FROM CALLER
GROUP BY USERNAME
HAVING COUNT(*)>1
Update: To get all duplicate rows:
SELECT * FROM CALLER WHERE USERNAME IN
(
SELECT USERNAME FROM CALLER
GROUP BY USERNAME
HAVING COUNT(*)>1
)
Problem
I have MySQL database and a have a table named CALLER. In table caller I need to check if in column USERNAME there are values which exist more than once and if exist to list all these values. Thank you