TableName : yourtablename
Existed Fields: yourfield1,yourfield2, handle.......
删除指定字段yourfield1为MatchedString所所有重复项
delete * from yourtablename where yourfield1='MatchedString' and handle not in (select min(Handle) from yourtablename where yourfield1='MatchedString')
删除数据库中所有存在重复项的字段
delete * from yourtablename where handle not in (select distinct min(handle) from yourtablename group by yourfield1)
本文提供两种SQL语句来解决数据库中重复记录的问题:一是删除指定字段下匹配特定字符串的所有重复项;二是清除所有字段下存在的重复项。
2357

被折叠的 条评论
为什么被折叠?



