Index: src/documentation/content/xdocs/faq.xml
===================================================================
--- src/documentation/content/xdocs/faq.xml	(revision 652071)
+++ src/documentation/content/xdocs/faq.xml	(working copy)
@@ -412,8 +412,61 @@
       <answer>
       <p>
       Derby supports limiting the number of rows returned by a query through
-      <a href="http://mail-archives.apache.org/mod_mbox/db-derby-dev/200411.mbox/%3c41A95632.3010301@debrunners.com%3e">JDBC</a>.
+      <a href="http://mail-archives.apache.org/mod_mbox/db-derby-dev/200411.mbox/%3c41A95632.3010301@debrunners.com%3e">JDBC</a>. For example, to fetch the first 5 rows of a large table:
       </p>
+      <!-- Using <code> and <br/> tags etc. as a workaround for including 
+           multi-line formatted code examples, since Forrest's XML 
+           validation fails when using other HTML tags (such as <pre>) in 
+           this DTD element.
+      -->
+      <p>
+      <code>Statement stmt = con.createStatement();</code><br/>
+      <code>stmt.setMaxRows(5);</code><br/>
+      <code>stmt.execute("SELECT * FROM myLargeTable");</code><br/>
+      </p>
+      <p>
+      Some related tuning tips are available in 
+      <a href="http://www.onjava.com/pub/a/onjava/2007/01/31/tuning-derby.html?page=1">this 
+      external article</a>.
+      </p>
+      <p>
+      Starting with the 10.4.1.3 release Derby also supports limiting the number of
+      rows using the <code>ROW_NUMBER</code> function. 
+      </p>
+      <p>
+      For example, to fetch the first 5
+      rows of a large table:
+      </p>
+      <p>
+      <code>SELECT * FROM (</code><br/>
+      &nbsp;&nbsp;&nbsp;&nbsp;<code>SELECT ROW_NUMBER() OVER() AS rownum, myLargeTable.*</code><br/>
+      &nbsp;&nbsp;&nbsp;&nbsp;<code>FROM myLargeTable</code><br/>
+      <code>) AS tmp</code><br/>
+      <code>WHERE rownum &lt;= 5;</code><br/>
+      </p>
+      <p>
+      The <code>ROW_NUMBER</code> function can also be used to select a 
+      limited number of rows starting with an offset, for example:
+      </p>
+      <p>
+      <code>SELECT * FROM (</code><br/>
+      &nbsp;&nbsp;&nbsp;&nbsp;<code>SELECT ROW_NUMBER() OVER() AS rownum, myLargeTable.*</code><br/>
+      &nbsp;&nbsp;&nbsp;&nbsp;<code>FROM myLargeTable</code><br/>
+      <code>) AS tmp</code><br/>
+      <code>WHERE rownum &gt; 200000 AND rownum &lt;= 200005;</code><br/>
+      </p>
+      <p>
+      For more information, refer to the ROW_NUMBER built-in function in 
+      the Derby Reference Manual (available from the 
+      <a href="manuals/index.html">Documentation page</a>). Development 
+      notes are available on the 
+      <a href="http://wiki.apache.org/db-derby/OLAPRowNumber">OLAPRowNumber 
+      wiki page</a>.
+      </p>
+      <p>
+      The <code>LIMIT</code> keyword is not defined in the SQL standard, 
+      and is currently not supported.
+      </p>
       </answer>
     </faq>
     <faq id="schema_exist">
