lundi 2 mars 2015

Delete consecutive duplicates from a table in mysql


Vote count:

0




I have a database , where table contains consecutive duplicate rows . Demo of table with data is as follows.



id name processed
1 xyz 0
2 xyz 0
3 ABC 0
4 ABC 0


I want to delete the consecutive duplicate from this table , and once duplicate is deleted update processed to 1. So that the final table looks like follows.



id name processed
1 xyz 1
3 ABC 1


Please help me on this. Thanks in advance.



asked 1 min ago







Delete consecutive duplicates from a table in mysql

Aucun commentaire:

Enregistrer un commentaire