Created
March 2, 2019 20:57
-
-
Save julienbourdeau/9cda9fe056e345daad15ca20af6e68f0 to your computer and use it in GitHub Desktop.
Delete duplicate entries from db with single SQL query
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
-- example from www.lasceneparisienne.com DB | |
DELETE n1 FROM calendar_events n1, | |
calendar_events n2 | |
WHERE n1.id < n2.id | |
AND n1.id_facebook = n2.id_facebook | |
AND n1.calendar_id = 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment