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萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章