sql how to check duplicate rows code example
Example 1: sql query to find duplicates in column
SELECT name, COUNT(email)
FROM users
GROUP BY email
HAVING COUNT(email) > 1
Example 2: how to query without duplicate rows in sql
SELECT DISTINCT col1,col2... FROM table_name where Condition;