查询出URL字段重复的记录,
select URL,COUNT(URL) from Tb_Blog_List group by URL having(count(*))>1
这条语句我们能看到重复的URL和重复次数,
查询出多余的记录,比如重复三条,只查询出两条,
select * from Tb_Blog_List as A where SysNo not in (select max(SysNo) from Tb_Blog_List as B where A.URL=B.URL)
注意:SysNo是不会重复的字段,URL是会重复的字段
留下您的脚步
最近评论