kanatera
asked on
How can i get row number from oracle table
I want to get the record number from the oracle table , i have ever used rownum and rowid before but it does not work because rownum can use only with "<" (lower than) sign i can not use "=" or ">" ,i want the case that can fix that the data must be in the record 50-100 or something like this because i must manipulate the data that have more than 280,000 record , thanks for advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks you very much now i can use it now,it's very pleasure from you
But, you don't have to create view, You can always make use of INLINE query.
I am afraid because data is large.
In anyway you can try this query.
SELECT * FROM ( SELECT col1,col2,ROWNUM rw_num
FROM table1)
WHERE rw_num BETWEEN 20 AND 30;
Or
You can issue the following query to make it affective & efficient
Suppose the &upper_bound and &lower_bound are the bound records
SELECT * FROM ( SELECT col1,col2,ROWNUM rw_num
FROM table1
WHERE ROWNUM <= &upper_bound)
WHERE rw_num BETWEEN &lower_bound AND &upper_bound;
Hope this helps you !