Skip to content

Instantly share code, notes, and snippets.

@ojimac
Created June 4, 2012 15:12
Show Gist options
  • Save ojimac/2868985 to your computer and use it in GitHub Desktop.
Save ojimac/2868985 to your computer and use it in GitHub Desktop.
あるカラムの値が重複しているレコードを抽出するSQL
SELECT {COLUMN_NAME}
FROM {TABLE_NAME}
GROUP BY {COLUMN_NAME}
HAVING COUNT({COLUMN_NAME}) <> 1
@ojimac
Copy link
Author

ojimac commented Jun 4, 2012

たまに使うけど忘れるのでめも

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment