I have a table -
emp_record
which has 40,000 records And I want to fetch the records from java code and below is the requirement -
- At a time only 1000 records should be returned
- In the next hit next 1000 records
- continue till all the records exhaust
- The SQL query should not be nested, like
select *
from(
SELECT a.*,rownum rn
FROM distributor a)
WHERE rn >= 3000 and rn < 4000;
Any sort of help is much appreciated.