你表里就俩字段的话不太好弄,如果有第三个字段select post_content,post_title from wp_posts group by post_content,post_title having count(*)>1先看看有多少重复的假设你表中还有id的一个字段select min(id),post_content,post...
你的图中post_content全一样,post_title有两种,这算不算重复呀?我按post_content重复就查找出来。查重:select post_content,post_title from wp_posts group by post_content having count(post_content)>1删除要先将数据查询到...
使用临时表求出重复记录select userid from t_name group by userid having count(*) > 1求出不重复记录select distinct * into #a1 from t_name where userid in select userid from t_name group by u...
select * from table1 b where bill_id=(select top 1 bill_id from table1 a where exists(select top 1 column1 from table1 where column1=a.column1 group by column1 having count(*)>1 or...