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: How to get the n-th row?

Re: How to get the n-th row?

From: Peter Schneider <pschneider.ctj_at_metronet.de>
Date: 1998/01/14
Message-ID: <34bd3848.6362183@pop-news.metronet.de>#1/1

On Wed, 14 Jan 1998 11:26:15 -0500, Bill Majoros <wmajoros_at_thomtech.com> wrote:

>
>Does anyone know if I can request a particular row using an integer
>number? For example, I would like to request the n-th row in a table.
>I know about ROWNUM, but I believe that is query-specific. I need
>something I can use to identify the row uniquely. I could use ROWID,
>but that is an 18-byte string, and I will be transmitting these over the
>internet; I would rather use a 32-bit number. I also don't want to have
>to add another column to my table, because I am writing a
>general-purpose framework that makes no assumptions about the table
>being accessed.
>
>If anyone has any suggestions, please respond via e-mail:
> wmajoros_at_thomtech.com
>
>Thanks,
>-Bill Majoros
>

Bill,

in a relational database table, data is not stored in any particular order, so the question 'What is the n-th row?' is meaningless, unless a user defined order criterion is applied. I suggest that you use a number field as a surrogate primary key to uniquely identify your records. You can use an Oracle sequence for this purpose.

HTH,
Peter

-- 
Peter Schneider
pschneider.ctj_at_metronet.de
Received on Wed Jan 14 1998 - 00:00:00 CST

Original text of this message

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