Skip to content

Instantly share code, notes, and snippets.

@searock
Last active July 11, 2018 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save searock/cdff73d481e4fcc3518a to your computer and use it in GitHub Desktop.
Save searock/cdff73d481e4fcc3518a to your computer and use it in GitHub Desktop.
Search for duplicate values in a table.
select column_name, count(column_name)
from table
group by column_name
having count (column_name) > 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment