Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Total rows in table
Gary Waldrom wrote:
Hmmm... the rownum concept is intriguing. It seems that I can use this to
obtain random access
to my rows from a table:
eg.
select email from personal where rownum between 100 and 1000;
Since a cursor is sequential access is this the only way to obtain direct
access to rows from a table?
What if one wishes to sort the rows based on a column and then select the
ith through jth rows?
Cheers,
Henry Katz
ISCS, Inc
hkatz_at_iscs-i.com
> You will only get the total number of rows the last time the table was
> ANALYZEd by using the SELECT NUM_ROWS FROM USER_TABLES WHERE
> TABLE_NAME='MY_TABLE'; method, it is not accurate for the current table
>
> Gary Waldrom
> Amonra Insight Ltd.
> Authors of Q-file IT Quick Reference Guides
> http://www.q-file.com
>
>
> -----Original Message-----
> From: Alex Vinokur [mailto:alexander.vinokur_at_telrad.co.il]
> Posted At: Monday, January 03, 2000 11:24 AM
> Posted To: server
> Conversation: Total rows in table
> Subject: Total rows in table
>
> Using the following SQL command
> SELECT count (*) FROM MY_TABLE;
> we can get number of rows in MY_TABLE.
>
> Question. Is there another way to get this number?
> I tried to use the SQL command :
> SELECT NUM_ROWS FROM USER_TABLES WHERE TABLE_NAME='MY_TABLE';
> However, what I obtained is not number of rows in MY_TABLE.
>
> Thanks in advance,
> Alex
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Jan 17 2000 - 20:15:45 CST
![]() |
![]() |