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

9 lines
358 B
Markdown
Raw Normal View History

2023-08-14 16:19:25 +00:00
- 중복품번 검색
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
)