oracle刪除多餘重複行

wang_0720發表於2013-11-06
方法一
delete d where rowid in (select rowid from(select * from (select deptno ,(row_number() over(partition by deptno order by deptno))no from d) where no >1)d);
方法二
delete d where rowid not in (select min(rowid) from d group by deptno);

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27181165/viewspace-775847/,如需轉載,請註明出處,否則將追究法律責任。

相關文章