Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: urgent

Re: urgent

From: Veera Prasad <vprasad_at_olf.com>
Date: Wed, 18 Oct 2000 16:16:15 -0400
Message-Id: <10653.119710@fatcity.com>

--------------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 <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

--------------A63480E1AEDC0B6BDE7A688C

Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>

Couple of methods to eliminate duplicate values , here I go with
<br>First Method:
<br>delete &lt;table_name> a where rowid > (select min(rowid) from &lt;table_name>
b
<br>where a.col_name = b.col_name;
<p>Second Method:
<br>delete &lt;table_name> a where exists (select 'Dupes' from &lt;table_name>
b
<br>where a.col_name = b.col_name and b.rowid > a.rowid);
<p>Veera
<br>Swapna_P wrote:
<blockquote TYPE=CITE>&nbsp;
<p><font face="Arial"><font color="#800080">how to delete the duplicate
records from a table............</font></font>
<br><font face="Arial"><font color="#800080">except for one field all the
rest of the fields are the same,so want to eliminate one record</font></font>
<p><font face="Arial"><font color="#800080">TIA</font></font>
<br><font face="Arial"><font color="#800080">swapna</font></font></blockquote>
</html>
Received on Wed Oct 18 2000 - 15:16:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US