List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:April 13 1999 1:37pm
Subject:Re: delete duplicate
View as plain text  
Xah Lee wrote:
> 
> Suppose I have a table that has identical rows for some reason. I need to
> delete the duplicates. Can this be done in MySql's SQL?
> 
> Thanks.
> 
> Xah
> xah@stripped
> http://www.best.com/~xah/PageTwo_dir/more.html
> 
Here is one method that uses a temporary unique index to force deletion
of duplicate records.

alter ignore table tablename add unique( field1, field2, ... fieldx )

When you are  through, drop the index MySQL created.

Thread
delete duplicateXah Lee13 Apr
Re: delete duplicateDon Read13 Apr
Re: delete duplicateGerald Clark13 Apr
Re: delete duplicateJeff Hill13 Apr
Re: delete duplicateGerald Clark16 Apr