Oracle Logbook

June 2, 2008

How to find duplicate record in Oracle

Filed under: Uncategorized — Helio Dias @ 1:23 pm

It´s easy, you just query twice your table when rowid are lower and all columns are the same. e.g.

select t1.rowid from table1 tb1,table1 tb2
where t1.rowid<t2.rowid
t1.col1=t2.col1 and
t1.col2=t2.col2 and
t1.col3=t2.col2 and
t1.col4=t2.col2 and
t1.col5=t2.col2 and …….

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: