title: Simple way to select first few rows in derby?
body: <p>Derby doesn't have a rownum feature?</p>
  
  <p>In oracle, I can select first 3 rows like the followings.</p>
  
  <pre><code>select * from a where rownum &lt; 3
  </code></pre>
  
  <p>In <a href="http://wiki.apache.org/db-derby/OLAPRowNumber" rel="nofollow">here</a>, they suggests like the followings. But it's tedious.</p>
  
  <pre><code>SELECT * FROM (
    SELECT
      ROW_NUMBER() OVER (ORDER BY key ASC) AS rownumber,
      columns
    FROM tablename
  ) AS foo
  WHERE rownumber &lt;= n 
  </code></pre>