-
-
Save GeeH/5004002 to your computer and use it in GitHub Desktop.
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 | |
blah | |
WHERE | |
id NOT IN ( | |
SELECT | |
c.id | |
FROM | |
blah c | |
LEFT JOIN | |
blah d | |
ON ( | |
c.common_field = d.common_field | |
AND c.id < d.id | |
) | |
WHERE | |
d.id IS NULL | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment