how to remove dublicates from your mysql table

nice mysql syntax for removing dublicates from your tables

strategy as follows

clone your table with
create table a as select * from b

truncate your table
truncate b

create unique index
create unique index u_indx1 on b (x,y,z)

insert all rows back to table with ignore
insert ignore into b select * from a

Comments

yumu said…
üstad tabloyu uçurdun ya. real life practice i olmamış pek.

Popular posts from this blog

Pyppeteer fix for BrowserError: Browser closed unexpectedly

overlay filesystem and containers

How to add pagination to django comments for your model