Odp: sql-question
Posted in 1999
B. Pankowski — — source: Informix-list mailing list archive (1991-1998)
U'ytkownik Dieter Powroznik <dieter.powroznik@depot147.dpd.de> w wiadomo'ci
do grup dyskusyjnych napisa':3778a645$0$19529@news.dpn.de...
> Hi!
> I have in a table 250000 data records. 300 of this records
> are duplicate in one field. How can i with a sql-statement
> delete one of this duplicate records. There are no index
> on this table.
>
DELETE FROM table WHERE rowid IN
( SELECT a.rowid FROM table a, table b
WHERE a.field = b.field AND a.rowid > b.rowid )
and first you can CREATE INDEX for field
> Thanks for help!
> Dieter
>
>