急求SQL语句!!@
用SQL语句实现,查询数据库中重复的记录,怎么能查询出来?
[解决办法]
select 字段,count(*) from 表 group by 字段 having count(*)> '1 '
[解决办法]
如果查全部记录.假设重复记录字段为ID
select * from tb where id in (select id from tb group by id having count(*)> 1)
[解决办法]
一楼正解:select 字段,count(*) from 表 group by 字段 having count(*)> 1