Last active
August 29, 2015 14:01
-
-
Save anchoo2kewl/e75f61b2b6536fb90f7b to your computer and use it in GitHub Desktop.
Delete all the duplicate entries from a table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM xyz where id in ( SELECT id from (SELECT id | |
FROM xyz | |
GROUP BY | |
name | |
HAVING COUNT(*) > 1) as newXYZ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment