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: Duplicate Table Entries

Re: Duplicate Table Entries

From: Connor McDonald <hamcdc_at_yahoo.co.uk>
Date: Sat, 16 Apr 2005 12:07:34 +0100 (BST)
Message-ID: <20050416110734.92587.qmail@web86908.mail.ukl.yahoo.com>


something like

select *
from (
  select *,

      row_number() over ( partition by col1, col2, col3, col4 order by <whatever> ) as r   from my_table
)
where r > 1

show the rows that have a duplicated based on col1,2,3,4

htht
connor

Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions" Co-author: "Oracle Insight - Tales of the OakTable"

web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day"


Send instant messages to your online friends http://uk.messenger.yahoo.com

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Apr 16 2005 - 07:11:58 CDT

Original text of this message

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