To remove duplicated rows from Oracle, I tend to use the following:
DELETE FROM your_table WHERE rowid not in (SELECT MIN(rowid) FROM your_table GROUP BY column1, column2, column3);
(taken from SO)
However, I'd like to remove the same rows in a slightly different scenario. Image there is a table with rows:
surname. Duplicate row is when
nameis the same, and
surnameis the same, or starts with
+(plus sign) and then is the same.
For example, the following is to be considered the same:
name: John, surname Doe
name: John, surname +Doe
How do I remove those duplicated rows?