Skip to content

Instantly share code, notes, and snippets.

@mamoo
Created October 7, 2014 06:39
Show Gist options
  • Select an option

  • Save mamoo/33650f7ade2dd588c038 to your computer and use it in GitHub Desktop.

Select an option

Save mamoo/33650f7ade2dd588c038 to your computer and use it in GitHub Desktop.
Find duplicate column value in DB
SELECT col_1, COUNT(*) FROM table GROUP BY col_1 HAVING COUNT(*) > 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment