title: Oracle SQL select 1000 rows at a time out of a hundred thousand rows
body: <p>I have a table with approx. 150 thousand rows and I have to fetch 1000 rows at a time using Java Quartz Scheduler. The requirement is to limit 1000 rows at a time then next 1000 rows etc.(Same as MySQL limit query).</p>
  
  <p>I'm using following query:</p>
  
  <pre><code>select * from ( select a.*, rownum rnum from (SELECT a.product_id as productId, 
  p.project_id as projectId from &lt;TABLE-1&gt; a INNER JOIN &lt;TABLE-2&gt; p 
  ON p.product_id = a.product_id ORDER BY a.product_id ) 
  a where rownum &lt;= 1000) where rnum &gt;= 1;
  </code></pre>
  
  <p>The issue is the above query is returning extra column rownum which I don't need in the resultset because the returned data is passed to MapListHandler() which in return convert result to JSON and I'm passing this JSON to a webservice which is not expecting extra rownum column.\</p>
  
  <p><strong>Database Oracle 11g Enterprise Edition Release 11.2.0.3.0</strong></p>