Home » SQL & PL/SQL » SQL & PL/SQL » how to remove duplicate rows from table
how to remove duplicate rows from table [message #584059] Wed, 08 May 2013 06:27 Go to next message
pankajdurve
Messages: 18
Registered: April 2013
Location: MUMBAI
Junior Member
one question is asked by hr.
how to remove duplicate rows from table?
i couldn't give answer of this question?
Re: how to remove duplicate rows from table [message #584061 is a reply to message #584059] Wed, 08 May 2013 06:39 Go to previous messageGo to next message
Michel Cadot
Messages: 57612
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Like any other hundreds of people that already posted the same question here and in every Oracle forum.
So just search.

Regards
Michel
Re: how to remove duplicate rows from table [message #584091 is a reply to message #584061] Wed, 08 May 2013 10:18 Go to previous messageGo to next message
Littlefoot
Messages: 18833
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Have a look at OraFAQ's How does one eliminate duplicate rows from a table.
Re: how to remove duplicate rows from table [message #584103 is a reply to message #584091] Wed, 08 May 2013 13:22 Go to previous messageGo to next message
rajivn786
Messages: 126
Registered: January 2010
Senior Member
Delete from table a
 where rownum > (Select min(rownum) 
                     from table b
                       where a.id = b.id) 
Re: how to remove duplicate rows from table [message #584105 is a reply to message #584103] Wed, 08 May 2013 13:26 Go to previous messageGo to next message
Michel Cadot
Messages: 57612
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is wrong, I advise you to read the link posted by Littlefoot.

Regards
Michel
Re: how to remove duplicate rows from table [message #584106 is a reply to message #584105] Wed, 08 May 2013 13:52 Go to previous messageGo to next message
rajivn786
Messages: 126
Registered: January 2010
Senior Member
ok..
Re: how to remove duplicate rows from table [message #584108 is a reply to message #584059] Wed, 08 May 2013 14:05 Go to previous message
Pms_SARA07
Messages: 3
Registered: May 2013
Location: Trichy
Junior Member
Delete tab1 where rowid not in (select min (rowid) from tab1 group by col1, col2,..)
Previous Topic: pls write queries for following questions
Next Topic: Selecting a Specific date/time Range
Goto Forum:
  


Current Time: Sat Apr 19 20:10:13 CDT 2014

Total time taken to generate the page: 0.07469 seconds