//查看重复记录语句
//说明:WP_Search_History → 数据库表名;SH_ID → 为标识列名(唯一);SH_PageURL → 为有重复数据的列名
select SH_ID from WP_Search_History s1 where SH_ID not in (
select max(SH_ID) from WP_Search_History s2 where s1.SH_PageURL =s2.SH_PageURL )
//删除重复记录
//说明:WP_Search_History → 数据库表名;SH_ID → 为标识列名(唯一);SH_PageURL → 为有重复数据的列名
delete from WP_Search_History where SH_ID in(
select SH_ID from WP_Search_History s1 where SH_ID not in (
select max(SH_ID) from WP_Search_History s2 where s1.SH_PageURL =s2.SH_PageURL ))