Created
November 15, 2016 12:25
-
-
Save csalgueiro/eb4f530dedf70ee5a2cdb1e965af1ef4 to your computer and use it in GitHub Desktop.
eliminar_duplicados MYSQL
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
CREATE TEMPORARY TABLE tabla_temporal AS | |
SELECT id | |
FROM tabla_original | |
GROUP BY campo_unico_1, campo_unico_2; | |
DELETE FROM tabla_original | |
WHERE id NOT IN(SELECT id FROM tabla_temporal); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment