Oracle中刪除重複資料的Sql

ljm0211發表於2012-06-20
刪除childitem和facility重複的資料:
DELETE FROM gcost_gt$catalog t1
                  WHERE t1.ROWID !=
                (SELECT MAX (ROWID)
                   FROM gcost_gt$catalog t2
                  WHERE t1.childitem = t2.childitem and t1.facility = t2.facility);

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

相關文章