You can use SQL Plus:
Option 1) The simplest and most elegant Method
CREATE TABLE table_without_duplicates AS
SELECT DISTINCT *
FROM table_with_duplicates ;
COMMIT;
DROP TABLE table_with_duplicates ;
COMMIT;
RENAME TABLE table_without_duplicates table_with_duplicates;
Option 2) An Oracle-specific Method
For Oracle, this solution utilizes the unique rowid of each row in a table,
and removes all duplicate rows in a table:
DELETE FROM my_table t
WHERE EXISTS (
SELECT *
FROM my_table tt
WHERE t.rowid > tt.rowid
AND other criteria)
The rowid > part makes sure you take the first of the rows in the duplicate set...
HTH
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only