Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORACLE rowid ?

Re: ORACLE rowid ?

From: Daniel A. Morgan <damorgan_at_exesolutions.com>
Date: Tue, 01 Jan 2002 23:18:09 +0000
Message-ID: <3C3243B0.4116D74C@exesolutions.com>


You are misunderstanding the purpose of rowid. Jim's explanation though should help you with that.

To select the 1000th row do this:

SELECT *
FROM (
   SELECT field1, field2, rownum THEROW
   FROM mytable
   WHERE rownum < 1001)
WHERE therow = 1000;

Dan Morgan

Pieter Agenbag wrote:

> 1] Are the Oracle ROWIDs gauranteed to be sequential ??
> 2] What is sequetial ROWIDs? ie. Does it work on the ASCII values of the
> alphanumeric chars ? Only A-Z & a-z ??
>
> OR
>
> 3] How can I select a specific row on rownum ??
> Like I would select where rowid = 'ABCABCABCabcabcabc' I want to be able to
> select where rownum = 1000
>
> -------------------------
>
> We had a disk failure - yes yes no shadowing , no backups - for various
> reasons - so I'm trying to restore what data I can from the effected table.
>
> The only way I could think of doing this was to step through each record
> based on rowid or rownum - if I can select the record , it's not corrupted -
> select the row and insert into a temp table.
>
> Until now I've done it like so.
> select from table1 where rowid > last_rowid and rownum <= 1 order by rowid;
>
> However when I reach a corrupt record I don't have the "last rowid" for the
> corrupt record , so I cannot move on to the next one.
> That's why I want to know how I can manually increment the rowid.
>
> If anyone has any other ideas how to get the data out .. Please let me
> know...!!!
>
> note: I'm not a DBA , I'm a C++ developer - so please explain carefully. :)
>
> ANOTHER NOTE:
> Please reply by email .. I'll be busy trying to figure this out - thus I
> won't be checking into the newsgroup regularly for replies.
>
> Thanx !!
> PLEASE help .. I don't want to work on Christmas anymore :(
Received on Tue Jan 01 2002 - 17:18:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US