Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Problem
Hi Elena,
Just to "confuse" you a little, there is no such thing as the 500th row
in a relational database. At least not an identified 500th row. The
sequence of how rows are stored is "random" and not guranteed by Oracle.
Hence, you can experience getting different rows if you just query for
the 500th row (Oracle only shuffle rows when you alter/insert/delete
data).
If you number the rows yourself, for instance as a primary key, you can easaly get to key value 500, as you would normally do. Oracle does provide a number of row counter, called NUMROWS - but as I stated above, you'll not have any guarentee which record this one fetches.
The confusion is, that a table is the same a file. But it's not! A table does not have any order in the way data is stored internally (of course there is an order ... but it can be changed at any time without notice).
Elena Sotelo 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!!!
>
> --
> Elena Sotelo
> mailto:esotelo_at_ipmultimedia.es
>
> IP Multimedia, S.L.
> Marina, 16-18 Pl. 18
> Telf: (93) 225 99 80
> Fax: (93) 225 99 81
--
Peter H. Larsen, Oracle and Applications specialist
Dynamic Resources Inc, Alexandria
Email: plarsen_at_dc.dynares.com
(please remove the nospam from the header when replying to this email)
The above views are my own and does not reflect the views of my employer. Received on Thu Jul 09 1998 - 07:17:06 CDT