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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -