| 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 duplicate | Xah Lee | 13 Apr |
| • Re: delete duplicate | Don Read | 13 Apr |
| • Re: delete duplicate | Gerald Clark | 13 Apr |
| • Re: delete duplicate | Jeff Hill | 13 Apr |
| • Re: delete duplicate | Gerald Clark | 16 Apr |
