DELETE FROM employees WHERE rowid NOT IN (SELECT max(rowid) FROM employees GROUP BY emp_id);
Subquery select a unique rowid from all the rows. Rows which are not return by subquery are the duplicate rows.
No comments:
Post a Comment