Problem solve Get help with specific problems with your technologies, process and projects.

Removing duplicate records by using Oracle's ROWID

Explains how a table of records can be de-duped by using ROWID column in Oracle.

A table of records can be deduped by using ROWID column in Oracle. A ROWID is a unique location of a row in the...

database that never changes for the life of that row. By using ROWID, Oracle Optimizer would select the fastest path, which is a direct route to a single row of data. The following code selects the most current record for every duplicate pair of col1 and col2.

		
Select col1,col2,col3,col4 from TableName where
ROWID in (select max(ROWID) from TableName
group by col1,col2)

For More Information


Dig Deeper on Oracle and SQL

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close