delete duplication record in sql server

yzf01發表於2007-12-24
DELETE
FROM MyTable
WHERE ID NOT IN
(SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicatevalueColumn1, DuplicateValueColumn2, DuplicateValueColumn2[@more@]

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

相關文章