Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Problem
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
![]() |
![]() |