Created
March 2, 2012 11:38
-
-
Save rodurma/1957926 to your computer and use it in GitHub Desktop.
Removendo registros duplicados no 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 TABLE tabela_temporaria as SELECT * FROM tabela_atual WHERE 1 GROUP BY [coluna com registros duplicados]; | |
DROP TABLE tabela_atual; | |
RENAME TABLE tabela_temporaria TO tabela_atual; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment