Home » RDBMS Server » Server Administration » Deleting duplicate rows
Deleting duplicate rows [message #371068] Tue, 22 August 2000 03:53 Go to next message
Thavamani
Messages: 11
Registered: July 2000
Junior Member
Hi,
Can anyone hlp me in deleting duplicate rows without using rowid?
Re: Deleting duplicate rows [message #371069 is a reply to message #371068] Tue, 22 August 2000 10:25 Go to previous messageGo to next message
Subrahmanyam Thodla
Messages: 6
Registered: February 2000
Junior Member
Here is an idea:

delete from cd where rowid in (select a.rowid from cd a where
a.rowid in (select b.rowid from cd b where a.id = b.id and
rownum < (select count(*) from cd d where d.id = b.id group by id )))
Re: Deleting duplicate rows [message #371097 is a reply to message #371068] Fri, 25 August 2000 07:08 Go to previous messageGo to next message
geetha
Messages: 20
Registered: August 2000
Junior Member
The possible way to delete duplicate records without using rowid is
CREATE TABLE temp AS SELECT DISTINCT * FROM my_tab;
DROP TABLE my_tab;
RENAME temp TO my_tab;

There are many simple ways to delete duplicate rows using rowid. I would give it if u r interested.
Re: Deleting duplicate rows [message #371098 is a reply to message #371068] Fri, 25 August 2000 07:09 Go to previous messageGo to next message
geetha
Messages: 20
Registered: August 2000
Junior Member
The possible way to delete duplicate records without using rowid is
CREATE TABLE temp AS SELECT DISTINCT * FROM my_tab;
DROP TABLE my_tab;
RENAME temp TO my_tab;

There are many simple ways to delete duplicate rows using rowid. I would give it if u r interested.
Re: Deleting duplicate rows [message #372244 is a reply to message #371068] Mon, 22 January 2001 08:13 Go to previous messageGo to next message
Vijay
Messages: 116
Registered: September 1999
Senior Member
I want to delete duplicate rows
Re: Deleting duplicate rows [message #372245 is a reply to message #371068] Mon, 22 January 2001 08:14 Go to previous message
Vijay
Messages: 116
Registered: September 1999
Senior Member
I want to delete duplicate rows
Previous Topic: Oracle Number data type
Next Topic: Appending a spool file
Goto Forum:
  


Current Time: Mon Dec 23 01:04:35 CST 2024