Skip to content
Advertisement

Return all duplicate rows

I’ve written this code to find duplicates and it works fine:

The problem is, it’s returning just one of the duplicate rows. Is it possible to return all the duplicate rows? I’m guessing it may have something to do with the ‘GROUP BY’ but I’m not sure how to change it. I don’t want to delete the values, just return them.

Advertisement

Answer

You have to join back to the table again to get the duplicates I think. Something like:

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