oracle去重

1.oracle查找表中的重复数据

   select testid,count(1)
   from table
   group by testid
   having count(1)>1;
   testid 标签号

2.去重

   detele from tab_name a
   where col1,col2 in(
                                select col1,
                                col2
                                from tab_name
                                group by col1,col2
                                having count(*)>1);




发布了37 篇原创文章 · 获赞 3 · 访问量 1万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章