Home » SQL & PL/SQL » SQL & PL/SQL » How to delete duplicate entries in a table ? (Oracle 9i)
How to delete duplicate entries in a table ? [message #346251] Sun, 07 September 2008 23:14 Go to next message
evk_87
Messages: 8
Registered: September 2008
Junior Member
In oracle 9i ........How to delete duplicate entries in a table ?

if suppose in a table named office, one or more entry(row) is repeated more then twice or minimum twice.
I need a query to delete the multiple entries ....

Note:
--->No constraints applied on the table.
--->No Primary Key
--->You cannot create any object....that is no view or a duplicate table can be created

please help !!!
Re: How to delete duplicate entries in a table ? [message #346254 is a reply to message #346251] Sun, 07 September 2008 23:22 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & FOLLOW the Posting Guidelines as stated in URL above

How do you identify "duplicate"?

I am sorry to see that GOOGLE & search on this forum are both broken for you

Repairs have been started so please wait patiently until completed.
Additional information will be present after the Internet starts working for you once again.

[Updated on: Sun, 07 September 2008 23:23] by Moderator

Report message to a moderator

Re: How to delete duplicate entries in a table ? [message #346256 is a reply to message #346254] Sun, 07 September 2008 23:35 Go to previous messageGo to next message
subbu_tce
Messages: 98
Registered: July 2007
Location: pune
Member
Delete From <<Table_name>> A Where Rowid > ( Select Min(Rowid) From <<Table_name>> B Group by <<Column_Name>>
Where A.Common_column_id=B.Common_column_id
);
Re: How to delete duplicate entries in a table ? [message #346287 is a reply to message #346256] Mon, 08 September 2008 01:31 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
A group by before a where..
and the net query is delete X where rowid > Y

This might remove your doubles.. as well as non-duplicates.
Luckily its syntax is wrong.
icon14.gif  Re: How to delete duplicate entries in a table ? [message #390459 is a reply to message #346251] Fri, 06 March 2009 07:13 Go to previous messageGo to next message
evk_87
Messages: 8
Registered: September 2008
Junior Member
Thanks..... Smile Smile
Re: How to delete duplicate entries in a table ? [message #390948 is a reply to message #390459] Tue, 10 March 2009 07:20 Go to previous message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
There are so many ways to delete duplicate entries.but @anacedent
before asking forum its better to search at "GOOGLE" or previous forum answers
Previous Topic: to find sysdate of remote database (merged 3)
Next Topic: procs calling function
Goto Forum:
  


Current Time: Fri Dec 02 20:59:17 CST 2016

Total time taken to generate the page: 0.09319 seconds