Re: Deleting duplicate rows
From: Steve Newhouse <aj583_at_lafn.org>
Date: 1995/12/12
Message-ID: <4akf87$26p_at_dub-news-svc-3.compuserve.com>#1/1
Date: 1995/12/12
Message-ID: <4akf87$26p_at_dub-news-svc-3.compuserve.com>#1/1
Given a table name tab1 and column name key1 (> 1 is the source of duplicates)
delete from tab1 a
where exists
(select b.key1
from tab1 b
where a.key1=b.key1
and a.rowid != b.rowid)
steve_at_llap.demon.co.uk (Steven Pilgrim) wrote:
>Or
>create table y_tmp
>as select distinct *
> from y;
>truncate table y;
>insert into y
>select * from y_tmp;
>regards,
>Steve
Received on Tue Dec 12 1995 - 00:00:00 CET