SQL To Remove Duplicate Rows
Consider Below table EMPLOYEE Query: DELETE EMPLOYEE WHERE ROWID IN ( SELECT EMP.ROWID FROM EMPLOYEE EMP, ( SELECT MIN (ROWID) MINROW, EMPNAME FROM EMPLOYEE GROUP BY EMPNAME HAVING COUNT (EMPNAME)>1) SUBQ WHERE EMP.ROWID>SUBQ.MINROW AND EMP.EMPNAME=SUBQ.EMPNAME ); Result: