Sql操作 - 删除数据库重复项

TableName : yourtablename

Existed Fields: yourfield1,yourfield2, handle.......


删除指定字段yourfield1为MatchedString所所有重复项


delete * from yourtablename where yourfield1='MatchedString' and handle not in (select distinct min(Handle) from chnl where yourfield1='MatchedString')



删除数据库中所有存在重复项的字段


delete * from yourtablename where handle not in (select distinct min(handle) from yourtablename group by  yourfield1)


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。