Removing duplicate rows from table in Oracle -


i'm testing in oracle , populated table sample data, in process accidentally loaded duplicate records, can't create primary key using of columns.

how can delete duplicate rows , leave 1 of them?

use rowid pseudocolumn.

delete your_table rowid not in (select min(rowid) your_table group column1, column2, column3); 

where column1, column2, , column3 make identifying key each record. might list columns.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -