Skip to content
Advertisement

mySQL – Check Table for duplicates efficiently

I have a table “people” where (for simplicity) everyone has an ID, this ID is not unique so two entries can have the same ID. I now want to find all duplicates which I would do like this:

Sample data would be something like this:

Result should be:

But I would like to only compare entry A to all others, then B to all others EXCEPT A, etc. How do I do this?

Advertisement

Answer

I think that you want:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement