SQL重复记录查询
摘要:
1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断select*frompeoplewherepeopleIdin(selectpeopleIdfrompeoplegroupbypeopleIdhavingcount(peopleId)>1) 例二:select * from testtablewhere numeber in (select number from people group by number having count(number) > 1 )可以查出testtable表中number相同的记录2、删除表中多余的重复记录,重复记录是根据 阅读全文
posted @ 2011-09-08 17:20 秋天 阅读(243) 评论(0) 推荐(0) 编辑