...

View Full Version : On duplicate key delete



BubikolRamios
10-02-2011, 11:35 AM
I cant't find anything on net about that. Surprised that MySQL does not have that build in.

possible usage:

not normalized db, in which case we would not need ON DUPLICATE KEY DELETE:



id val
1 on
2 of
3 null
4 on
....


normalized db

master:


id
1
2
3
4
....



detail:


id
1
3
....

sunfighter
10-02-2011, 06:50 PM
You are correct there is no delete on duplicate in mtsql.

But here's a simple and fast way of doing it:
http://www.justin-cook.com/wp/2006/12/12/remove-duplicate-entries-rows-a-mysql-database-table/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum