Guest User

Untitled

a guest
Jan 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. -----------------
  2. | А | B |
  3. -----------------
  4. | 2 | 1 |
  5. | 3 | 4 |
  6. | 2 | null |
  7. | 3 | 4 |
  8. | 2 | 6 |
  9. | 4 | 4 |
  10. -----------------
  11.  
  12. for cdup in (select А, max(rowid) as rd
  13. from table
  14. group by А
  15. having count(1) > 1) loop
  16. delete from table where rowid <> cdup.rd;
  17. end loop;
Add Comment
Please, Sign In to add comment