Home » SQL & PL/SQL » SQL & PL/SQL » how to delete duplicate rows..
how to delete duplicate rows.. [message #6961] Tue, 13 May 2003 22:49 Go to next message
Mubeen
Messages: 44
Registered: February 2003
Member
Hi All,

The question is :-how can we delete duplicate rows in a table.

regards,

Mubeen.
Re: how to delete duplicate rows.. [message #6962 is a reply to message #6961] Tue, 13 May 2003 23:27 Go to previous messageGo to next message
Jayasri
Messages: 28
Registered: July 2000
Junior Member
This query has been discussed many times in this forum.

Duplicate rows can be deleted using rowid concept.

delete from t1 where rowid not in (select max(rowid) from t1);
Re: how to delete duplicate rows.. [message #6963 is a reply to message #6961] Wed, 14 May 2003 00:11 Go to previous message
robin baby
Messages: 13
Registered: May 2003
Junior Member
delete
from emp --tablename
a
where a.rowid !=
(select max(rowid)
from emp --tablename
b
where a.empno=b.empno --select all the columns u want check
) /*one of my friend MOHAN K tought me ,not my idea*/
Previous Topic: Multiple records and no records
Next Topic: Trying to use NextVALUE to establish the next sequential up number to go into a mandatory column en
Goto Forum:
  


Current Time: Wed Apr 24 04:44:22 CDT 2024