Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

delete all duplicate records and leave only the occurrence of first record

52026Mar 5 2002
Hi, can you help me with that
I need to find easy way to delete all duplicate records and leave only the occurrence of first record.
SQL>select kod,street from kancel;
KOD_OBL1 STREET
---------- ----------
108 28. ?mjna
110 Jesenicka
111 Gen. Hla?o
111 ?tefanikov
112 Mendelova
113 Hlavnm 77
114 Radni?nm 1
114 Hlavnm 148
114 8. p??mho
115 ?erotmnovo
116 Radni?nm 1

I want to delete all records wich are duplicate (but not the first occurrence, where must be stay). it means after deletion the select will fetch the data like this:

KOD_OBL1 STREET
---------- ----------
108 28. ?mjna
110 Jesenicka
111 Gen. Hla?o
112 Mendelova
113 Hlavnm 77
114 Radni?nm 1
115 ?erotmnovo
116 Radni?nm 1

thank you very much.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2002
Added on Mar 5 2002
3 comments
702 views