Skip to content

Instantly share code, notes, and snippets.

@L3V147H4N
Created March 18, 2015 17:26
Show Gist options
  • Save L3V147H4N/58cc98a54b6082124744 to your computer and use it in GitHub Desktop.
Save L3V147H4N/58cc98a54b6082124744 to your computer and use it in GitHub Desktop.
SQL - Find Duplicates By Given Field
SELECT *
FROM Table
WHERE Table.Field IN (
SELECT Table.Field
FROM Table
GROUP BY Table.Field
HAVING COUNT(*) > 1
)
ORDER BY Table.Field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment