Re: need help to delete duplicates

2006-04-17 Thread William Fong
If the ID doesn't represent anything, you can CREATE TABLE new_table SELECT DISTINCT Row1, Row2 FROM old_table And then recreate your index(es). All your autoincrement IDs will be changed. On 4/17/06, Patrick Aljord <[EMAIL PROTECTED]> wrote: > > On 4/18/06, William Fong <[EMAIL PROTECTED]> wr

Re: need help to delete duplicates

2006-04-17 Thread William Fong
Sample Data: ID-Row1-Row2 1-A-B 2-A-B Row1 and Row2 are duplicate, so you only want one. Which ID do you want? -will On 4/17/06, Patrick Aljord <[EMAIL PROTECTED]> wrote: > > hey all, > I have a table "mytable" that looks like this: > id tinyint primary key auto_increment > row1 varchar 15

need help to delete duplicates

2006-04-17 Thread Patrick Aljord
hey all, I have a table "mytable" that looks like this: id tinyint primary key auto_increment row1 varchar 150 row2 varchar 150 I would like to remove all duplicates, which means that if n records have the same row1 and row2, keep only one record and remove the duplicates. Any idea how to do this?