Created
September 12, 2013 09:04
-
-
Save LexaChebara/6534766 to your computer and use it in GitHub Desktop.
Quick removing of duplicate rows in Oracle table T over X, where X can be set of columns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELETE FROM T WHERE ROWID IN ( | |
| SELECT rid | |
| FROM (SELECT ROWID rid, ROW_NUMBER() OVER ( PARTITION BY X ORDER BY ROWID ) rn FROM T) | |
| WHERE rn > 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment