Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------
- | А | B |
- -----------------
- | 2 | 1 |
- | 3 | 4 |
- | 2 | null |
- | 3 | 4 |
- | 2 | 6 |
- | 4 | 4 |
- -----------------
- for cdup in (select А, max(rowid) as rd
- from table
- group by А
- having count(1) > 1) loop
- delete from table where rowid <> cdup.rd;
- end loop;
Add Comment
Please, Sign In to add comment