Skip to content

Instantly share code, notes, and snippets.

@games647
Last active August 26, 2016 11:51
Show Gist options
  • Save games647/6ee80a1f92b93b783c53d137960fc1e5 to your computer and use it in GitHub Desktop.
Save games647/6ee80a1f92b93b783c53d137960fc1e5 to your computer and use it in GitHub Desktop.
Find duplicates in SQL if COLUMN or COLUM, COLUM has the same values. Just replace TABLE and COLUMN with your setup.
SELECT
COLUMN, COUNT(*)
FROM
TABLE
GROUP BY
COLUMN
HAVING
COUNT(*) > 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment