Hi can you pls any one let me know" How to delete duplicate records from a table in oracle 9i
venkat.1981
0
Newbie Poster
Recommended Answers
Jump to PostIt is better to start a different thread for a new question.
anyways try to use this sample query
DELETE FROM emp e WHERE rowid>(SELECT MIN(ROWID) FROM emp WHERE e.empno=empno)
Jump to PostYou can also use this sample query with a different logic
DELETE FROM emp WHERE ROWID NOT IN(SELECT MAX(ROWID) FROM emp GROUP BY empno)
All 5 Replies
debasisdas
580
Posting Genius
Featured Poster
Sulley's Boo
commented:
:cool:
+4
debasisdas
580
Posting Genius
Featured Poster
Jx_Man
987
Nearly a Senior Poster
Featured Poster
debasisdas
580
Posting Genius
Featured Poster
mano_46
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.