How to fetch data from oracle in batches from java in equal batches
问题 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. 回答1: This sounds very artifical as 40.000 records is nothing. I would just read