Delete doubloon from a table with Mysql

All is in the title :

ALTER IGNORE TABLE myTable ADD UNIQUE INDEX(myField1, myField2);

And if you want to copy all a database into a new one :

CREATE TABLE myNewTable AS SELECT * FROM myTable;

Leave a Reply

Your email address will not be published. Required fields are marked *