Created
September 22, 2010 22:08
-
-
Save bcalloway/592675 to your computer and use it in GitHub Desktop.
SQL query to find duplicate records
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT t1.* | |
FROM table1 AS t1 | |
JOIN (SELECT col1 | |
FROM table1 | |
GROUP BY col1 | |
HAVING count(col1) > 1) AS t2 ON t1.col1 = t2.col1 | |
(where col1 is the column containing the duplication) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment