如何去提重复记录? select * from ypverify a where (select count(*) from ypverify b where a.barip=b.barip)>1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不可能吧,一个barip对应有多个id,你要sql给你显示哪个ID好? 这样读取重复的select * from ypverify a where (select count(*) from ypverify b where a.barip=b.barip)>1 select * from ypverify where id in(...) 也可以吗? select * from ypverify a where (select count(*) from ypverify b where a.barip=b.barip)>1这个也不行呀它返回了所有barip为192.168.123.43的记录呀, select * from ypverify where id in(...) 也可以吗?可以,但是记录数量是不定的,这句要怎么写, select barip,min(id) as id from sypverify group by barip或者 select barip,max(id) as id from sypverify group by barip 是不是csdn今天有问题,我给分为什么老是提交不成功? 其实可以用各种方法来处理,比如having count(*)>1select count(*),barip from sypverify group by barip having count(*)>1 新年好,请教with rollup grouping的用法??? 请教一个简单的动态查询问题 急等着!急急急! SQL死锁问题求助! 更新数据库里所以的排序规则,能否用一条SQL完成更新呢 请教一个存储过程的写法 sql server 2000 向 sql 2008 发布订阅问题 怎样写这样的统计语句???? 有时间的达人都进来看看,难题啊 请问oledb和odbc有什么区别?100分寻求答案! 大家看看我的这个问题:两表关联选择的问题, 【急】【急】【急】请邹建及各位老大帮忙解决问题!!!
select * from ypverify a where (select count(*) from ypverify b where a.barip=b.barip)>1
这个也不行呀
它返回了所有barip为192.168.123.43的记录呀,
可以,但是记录数量是不定的,这句要怎么写,
select barip,min(id) as id from sypverify group by barip或者 select barip,max(id) as id from sypverify group by barip
select count(*),barip from sypverify group by barip having count(*)>1