User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Oracle section within the Web Development category of DaniWeb, a massive community of 427,201 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,280 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Oracle advertiser: Programming Forums
Views: 4277 | Replies: 4
Reply
Join Date: Feb 2008
Posts: 1
Reputation: venkat.1981 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
venkat.1981 venkat.1981 is offline Offline
Newbie Poster

Re: how to select latest or last row in a table

  #1  
Feb 22nd, 2008
Hi can you pls any one let me know" How to delete duplicate records from a table in oracle 9i
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,290
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 83
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: how to select latest or last row in a table

  #2  
Feb 22nd, 2008
It is better to start a different thread for a new question.

anyways try to use this sample query

  1.  
  2. DELETE FROM emp e WHERE rowid>(SELECT MIN(ROWID) FROM emp WHERE e.empno=empno)
Last edited by debasisdas : Feb 22nd, 2008 at 5:58 am.
Share your Knowledge.
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,290
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 83
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: how to select latest or last row in a table

  #3  
Feb 22nd, 2008
You can also use this sample query with a different logic
  1. DELETE FROM emp WHERE ROWID NOT IN(SELECT MAX(ROWID) FROM emp GROUP BY empno)
Share your Knowledge.
Reply With Quote  
Join Date: Nov 2007
Location: � Jogja �
Posts: 2,585
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Rep Power: 11
Solved Threads: 235
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: How to delete duplicate records from a table

  #4  
Feb 22nd, 2008
what a piece code
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,290
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 83
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: How to delete duplicate records from a table

  #5  
Feb 25th, 2008
I am glad to share my knowledge .
Share your Knowledge.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Oracle Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Oracle Forum

All times are GMT -4. The time now is 10:41 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC