Assume we have a table called EMP with duplicated data in the following columns (EMP_NAME,EMP_DEPT) and this duplicated data was added by mistake and you want to delete all Duplicated redords and let only one record.
you can use the following Delete Statement to do this action
DELETE EMP
where rowid not in (select max(rowid)
from EMP
group by EMP_NAME,EMP_DEPT);
No comments:
Post a Comment