Obsidian/Recognition/Programing/Oracle/중복 검색, 삭제.md

358 B

  • 중복품번 검색 select min (rowid) as rid , hold_no from imhist_sal where hold_no like '2016%' group by hold_no having count(hold_no) >= 2

  • 중복품번 삭제 (삭제후 중복 다시 확인) delete from imhist_sal where rowid in ( select max (rowid) as rid from imhist_sal where hold_no like '2016%' group by hold_no having count(hold_no) >= 2 )