remove duplicate in mysql table from two fields with different values -



remove duplicate in mysql table from two fields with different values -

i have table emails next fields:

id|email |bounced|groupid ---------------------------------------- 1 |**email1@domain.com**|0 |1 2 |**email1@domain.com**|1 |2 3 |email2@domain.com |0 |1

what want accomplish delete duplicates table email_table i.e. remove both have id 1 , 2 , similar in table.

i found mysql code didn't job:

alter ignore table email_table add together unique index(email,bounced);

how accomplish this?

i trying remove bounced emails interspire in whichever contact list exist; same email exists in 2 groups.

this unique question not remove duplicate 1 field...i need remove duplicate in 1 field having available in many other groups status has bounced value give thanks you

if want delete rows same email bounced @ to the lowest degree once:

delete t1, t2 email_table t1 inner bring together email_table t2 using (email) t1.bounced = 1;

mysql duplicates

Comments

Popular posts from this blog

python - How to add an model instance to a django queryset? -

Using Android Volley to post an array to PHP -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -