摘要: 在几千条记录里,存在着些相同的记录,如何能用SQL语句,删除掉重复的呢?1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断select * from peoplewhere peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)2、删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录delete from people where peopleId in (select peopleI... 阅读全文
posted @ 2013-07-31 12:11 JasonGu0 阅读(257) 评论(0) 推荐(0) 编辑