Skip to content

how to find the duplicate rows in MySQL

Sometimes you must check duplicate row in the database.
Duplicate rows my occur due to race conditions.
I use this solution to find out the duplicate row in my project:

select ColumnA, ColumnB, ColumnC, count(*) as NumDuplicates
from table
group by ColumnA, ColumnB, ColumnC


If you have a similar experience, please share it with me.

Published inprogramming challenge

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *