Identify data duplication across more than one column (MySQL)

Should you wish to identify data where there is duplicate data in more than one column you can use the query below:

This query is useful if duplicates in one column only do not need to be returned.

SELECT columnA, columnB, columnC, count(*) as c

from yourtable

group by

columnA, columnB having c > 1;

 

Be the first to comment on "Identify data duplication across more than one column (MySQL)"

Leave a comment

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.