Skip to content

Instantly share code, notes, and snippets.

@rodurma
Created March 2, 2012 11:38
Show Gist options
  • Save rodurma/1957926 to your computer and use it in GitHub Desktop.
Save rodurma/1957926 to your computer and use it in GitHub Desktop.
Removendo registros duplicados no MySQL
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