List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:August 31 2001 1:04pm
Subject:Re: duplicate delete query
View as plain text  
ALTER IGNORE TABLE mytable ADD UNIQUE (email);


will both add a unique key ( which will avoide this problem in the 
future ) and delete the duplicates.

Rory O'Connor wrote:

> excuse me if this is too newbie...but I need to perform a duplicate
> delete on my database using the e-mail address as the key.  I understnad
> how to use COUNT and DISTINCT together...
> 
> select count(DISTINCT email) FROM table;  
> 
> but I can't seem to find any info on how to perform the actual deletion
> of the duplicate records.  Any info is appreciated!
> 
> Thanks!
> 
> 
> 
> providing the finest in midget technology
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <mysql-thread84119@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
gerald_clark@stripped

Thread
duplicate delete queryRory O'Connor31 Aug
  • Re: duplicate delete queryChris Johnson31 Aug
  • Re: duplicate delete queryGerald Clark31 Aug
Re: duplicate delete queryRory O'Connor31 Aug
  • Re: duplicate delete queryCarl Troein31 Aug