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: SQL Problem

Re: SQL Problem

From: Nuno Guerreiro <nuno-v-guerreiro_at_telecom.pt>
Date: Wed, 08 Jul 1998 09:12:50 GMT
Message-ID: <35a4375d.686568212@news.telecom.pt>


On Fri, 03 Jul 1998 13:34:02 +0200, Elena Sotelo <esotelo_at_ipmultimedia.es> wrote:

>Hi, all!
>
> I have a problem with SQL SELECT. I want to do a SELECT of a
>determinate row, by example, "select ...row(500)... from table".
>
> Can I do this?? How??
>
> I know that rowid exists, but it is a number very stranger and I not
>understand it.
>
> Can anybody help me???
>
> PD: I works in Livewire at UNIX platform and Oracle database. Does
>anyone knows if in Livewire this is posible??
>
> Thanks in advance!!!
>
>--

Add a column to the table and define it as the PRIMARY KEY, then select the row you want using this column, e.g.:

Primary keys exist to uniquely identify rows in a table. Don't rely on the rowid - it's bad practice - that number may change.

ALTER TABLE test ADD pk NUMBER(10) PRIMARY KEY;

SELECT * FROM test WHERE pk=500;

Hope this helps,

Nuno Guerreiro Received on Wed Jul 08 1998 - 04:12:50 CDT

Original text of this message

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