Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: ROWID question?

Re: ROWID question?

From: Mark Richard <>
Date: Tue, 22 Oct 2002 15:39:17 -0800
Message-ID: <>


At the risk of going slightly off-topic. If the number of rows you are expecting to keep is relatively small, it might be much quicker to create a temporary table with the rows you wish to keep, truncate the main table and re-insert the rows back in. Of course this approach presents issues of its own.

Also, the comments about replacing rowid with the date column are very valid - There is no way to guarantee that the row with the newest date has a larger rowid. I always believe you should treat rowid's as a magical number - they are fine for referring to directly, but not things like min (), max() or any kind of manipulation.

Good luck.

                    Denham Eva                                                                                     
                    <       To:     Multiple recipients of list ORACLE-L <>       
                    za>                  cc:                                                                       
                    Sent by:             Subject:     ROWID question?                                              
                    Please respond                                                                                 
                    to ORACLE-L                                                                                    

Hello Gurus

Does Oracle reuse ROWID "numbers", once a delete of a row has been done?

The reason I ask is because, I need to delete duplicate records from a very large table.
However I must keep the newest date in one of the date columns.

If oracle does not reuse the ROWID this would be very simple. Here is my sql:

DELETE FROM tablename a

                        FROM tablename b
                        WHERE a.col1 = b.col1
                        AND a.col2 = b.col2
                        AND a.col3 = b.col3);

However if Oracle does reuse ROWID's then I have a serious sql problem :) All the examples I have of deleteing duplicates use the ROWID. If anyone has a suggestion on how else to do this I would be most grateful.

Otherwise answer on my main question would be fine. Many Thanks
Denham Eva

DISCLAIMER This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. TFMC, its holding company, and any of its subsidiaries each reserve the right to monitor and manage all e-mail communications through its networks.

Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be views of any such entity.

This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal - For more information please visit


   Privileged/Confidential information may be contained in this message.

          If you are not the addressee indicated in this message
       (or responsible for delivery of the message to such person),
            you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender
           by reply e-mail or by telephone on (61 3) 9612-6999.
   Please advise immediately if you or your employer does not consent to
                Internet e-mail for messages of this kind.
        Opinions, conclusions and other information in this message
              that do not relate to the official business of
                         Transurban City Link Ltd
         shall be understood as neither given nor endorsed by it.

Please see the official ORACLE-L FAQ:
Author: Mark Richard

Fat City Network Services    -- 858-538-5051
San Diego, California        -- Mailing list and web hosting services
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Oct 22 2002 - 18:39:17 CDT

Original text of this message