DELETE FROM Comment WHERE CommentID NOT IN (
SELECT MAX(CommentID) FROM Comment GROUP BY CommentContent, CommentDateTime
)
CommentContent, CommentDateTime 为重复的列
DELETE FROM Comment WHERE CommentID NOT IN (
SELECT MAX(CommentID) FROM Comment GROUP BY CommentContent, CommentDateTime
)
CommentContent, CommentDateTime 为重复的列
转载于:https://www.cnblogs.com/Kiss920Zz/archive/2012/10/30/2746471.html