你表里就俩字段的话不太好弄,如果有第三个字段select post_content,post_title from wp_posts group by post_content,post_title having count(*)>1先看看有多少重复的假设你表中还有id的一个字段select min(id),post_content,post_title from wp_posts group by post_content,post_title这些选出来后你看看这些是否可以不删除然后delete from wp_posts where id not in (select min(id) from wp_posts group by post_content,post_title) 没懂你补充的那句话是什么意思 那就是你上边的图里,你要把第一条和第三条删除呗?还有你问的那个字符集的问题,是瑞典,不是雅典
你的图中post_content全一样,post_title有两种,这算不算重复呀?我按post_content重复就查找出来。查重:select post_content,post_title from wp_posts group by post_content having count(post_content)>1删除要先将数据查询到临时表中,然后将原表清空,在追加回来。
selectid,name,memofromAwhereidin(selectidfromAgroupbyidhavingcount(1)>=2)1查询 abcd相同的记录:select * from F where a=b and b=c and c=d2查询有重复数据的记录select * from F group by a,b,c,d having count(*)>13取出数据过滤到重复的数据select distinct a,b,c,d from f