title: How do I get every nth row in a table, or how do I break up a subset of a table into sets or rows of equal size?
body: <p>I have a table of heterogeneous pieces of data identified by a primary key (ID) and a type identifier (TYPE_ID).  I would like to be able to perform a query that returns me a set of ranges for a given type broken into even page sizes.  For instance, if there are 10,000 records of type '1' and I specify a page size of 1000, I want 10 pairs of numbers back representing values I can use in a <code>BETWEEN</code> clause in subsequent queries to query the DB 1000 records at a time.  </p>
  
  <p>My initial attempt was something like this</p>
  
  <pre><code>select id, rownum from CONTENT_TABLE 
  where type_id = ? and mod(rownum, ?) = 0
  </code></pre>
  
  <p>But this doesn't work.  </p>