Re: duplicate delete query

2001-08-31 Thread Gerald Clark
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

Re: duplicate delete query

2001-08-30 Thread Carl Troein
Rory O'Connor writes: > I want to leave one record behind, but delete all other records that > have the same e-mail address. Is there a standard query for this or do > I need to write a script that will do it? Getting a list of the duplicate rows is simple enough, but deleting them requires a

Re: duplicate delete query

2001-08-30 Thread Rory O'Connor
;[EMAIL PROTECTED]> >Sent: Thursday, August 30, 2001 4:50 PM >Subject: duplicate delete query > > >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.

Re: duplicate delete query

2001-08-30 Thread Chris Johnson
ay, August 30, 2001 4:50 PM Subject: duplicate delete query 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

duplicate delete query

2001-08-30 Thread Rory O'Connor
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 deletio