Path: utzoo!utgpu!jarvis.csri.toronto.edu!torsqnt!tmsoft!masnet!canremote!steve.jackson From: steve.jackson@canremote.uucp (STEVE JACKSON) Newsgroups: comp.databases Subject: Re: SQL query for duplicates Message-ID: <89122504054787@masnet.uucp> Date: 24 Dec 89 04:30:00 GMT Organization: Canada Remote Systems Limited, Mississauga, ON, Canada Lines: 22 >I >hope I am not reduced to listing all rows and visually identifying the >duplicates. There are about 1000 rows. I would appreciate any >>suggestions. How about: ======================================================================= REM The select for update is required for updates and deletes based REM on rowid. select * from table for update of column / REM All rows having duplicate column keys will be deleted except for REM one in each group having the minimum rowid delete from table x where rowid > (select min(rowid) from table where column = x.column) / # copied from Oracle Technical Bulletin, June 1988 sjackson --- * Via ProDoor 3.1R