可以使用对该字段分组计数、再筛选小组计数大于1这个办法,筛选出有重复的记录。
例如:
select [被查字段名] from 表名 group by [被查字段名] having count([被查字段名])>1
如果需要输出所有字段,则可以这样写:
select * from 表名 where [被查字段名] in
(select [被查字段名] from 表名 group by [被查字段名] having count([被查字段名])>1)
select 字段,count(字段) from 表 group by 字段