I\'m testing something in Oracle and populated a table with some sample data, but in the process I accidentally loaded duplicate records, so now I can\'t create a primary ke
Using rowid-
delete from emp where rowid not in (select max(rowid) from emp group by empno);
Using self join-
delete from emp e1 where rowid not in (select max(rowid) from emp e2 where e1.empno = e2.empno );