Added By: Prem Tiwari | Last Updated:
This is a very short tutorial which describes how to find duplicate email records in user table using MySQL query. we have used the sub-queries with INNER JOIN to get the duplicate email address from the user table.
Login to your cPanel and open PHPMyAdmin and then click on the SQL tab and copy paste the below MySQL queries. Now click on the Go button to see the output of below MySQL queries.
SELECT u1.first_name, u1.last_name, u1.email FROM users as u1
INNER JOIN (
SELECT email FROM users GROUP BY email HAVING count(id) > 1
) u2 ON u1.email = u2.email;
I hope this tutorial helps you. Do Like & share with your friends 🙂