To find and delete duplicate rows from a table, you can execute the query below. Note that this is for Oracle. You can use it for other databases but you need to change the ‘rowid’ then.
1 2 3 4 5 6 7 8 9 |
delete from table_name A where a.rowid > any ( select B.rowid from table_name B where A.column_name = B.column_name ); |
You need to change the ‘table_name’ by your table name an the ‘column_name’ by your column you want to check on. To explain…