Hi, If you are looking for a delete - command, then you have to decide which of the duplicate rows you want to keep. Are they all the same even in the other fields?
Perhaps you want to do something like delete from members where exists (select rowid from members m2 where m2.name = members .name and m2.rowid < members .rowid) This statement deletes all rows where there exists a row with the same name and a lowe rowid. Rowid is an internal field of sqlite. Martin Gilles Ganault wrote: > Hello > > I have a table that has a lot of duplicates in the Name column. I'd > like to only keep one row for each. > > The following lists the duplicates, but I don't know how to delete the > duplicates and just keep one: > > SELECT name FROM members GROUP BY name HAVING COUNT(*) > 1; > > Thank you. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users