Message-Id: <10653.119710@fatcity.com> From: "Veera Prasad" Date: Wed, 18 Oct 2000 16:16:15 -0400 Subject: Re: urgent --------------A63480E1AEDC0B6BDE7A688C Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Couple of methods to eliminate duplicate values , here I go with First Method: delete a where rowid > (select min(rowid) from b where a.col_name = b.col_name; Second Method: delete a where exists (select 'Dupes' from b where a.col_name = b.col_name and b.rowid > a.rowid); Veera Swapna_P wrote: > > > how to delete the duplicate records from a table............ > except for one field all the rest of the fields are the same,so want > to eliminate one record > > TIA > swapna --------------A63480E1AEDC0B6BDE7A688C Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Couple of methods to eliminate duplicate values , here I go with
First Method:
delete <table_name> a where rowid > (select min(rowid) from <table_name> b
where a.col_name = b.col_name;

Second Method:
delete <table_name> a where exists (select 'Dupes' from <table_name> b
where a.col_name = b.col_name and b.rowid > a.rowid);

Veera
Swapna_P wrote:

 

how to delete the duplicate records from a table............
except for one field all the rest of the fields are the same,so want to eliminate one record

TIA
swapna