删除重复的数据
delete a from tb_dict a
where (a.keyword,a.nature) in (
select * from (select keyword,nature from tb_dict group by keyword, nature having count(*) > 1) b
)
and a.id not in (
select * from (select min(id) from tb_dict group by keyword, nature having count(*)>1) c
)
查询重复的数据
select * from tb_dict a
where (a.keyword,a.nature, a.freq) in (
select keyword,nature, freq from tb_dict group by keyword, nature, freq having count(*) > 1
)