去掉重复数据

表test003

select * from test003

其中有二条记录一模一样,怎么找出是哪个ID出现重复了呢?

方法一:

select id from test003
group by id
having count(*)>1

 方法二:

--1 oracle数据库怎么删除重复数据只留一个

Delete from TABLE1
where rowid
 not in (select min(rowid) from TABLE1 group by badge,name,location )

 

posted on 2015-01-01 16:49  modDx  阅读(197)  评论(0编辑  收藏  举报

导航