Skip to content

Instantly share code, notes, and snippets.

@ggendre
Created June 29, 2011 14:40
Show Gist options
  • Save ggendre/1053964 to your computer and use it in GitHub Desktop.
Save ggendre/1053964 to your computer and use it in GitHub Desktop.
SQL find duplicates 1/2
SELECT user.*
FROM user,
(SELECT id_user
FROM user
GROUP BY id_user
HAVING count( * ) >1
) doublons
WHERE user.id_user = doublons.id_user;
@ggendre
Copy link
Author

ggendre commented Jun 29, 2011

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