db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
Subject svn commit: r770442 - /db/derby/docs/trunk/src/ref/rrefsqljoffsetfetch.dita
Date Thu, 30 Apr 2009 20:50:51 GMT
Author: chaase3
Date: Thu Apr 30 20:50:51 2009
New Revision: 770442

URL: http://svn.apache.org/viewvc?rev=770442&view=rev
Log:
DERBY-4192: OFFSET and FETCH FIRST documentation improvement

Clarification of examples and note on sort order. 

Patch contributed by Tiago Espinha. 

Patch: derby-4192-2.patch

Modified:
    db/derby/docs/trunk/src/ref/rrefsqljoffsetfetch.dita

Modified: db/derby/docs/trunk/src/ref/rrefsqljoffsetfetch.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljoffsetfetch.dita?rev=770442&r1=770441&r2=770442&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsqljoffsetfetch.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsqljoffsetfetch.dita Thu Apr 30 20:50:51 2009
@@ -73,11 +73,22 @@
 <example>
   <title>Examples</title>
   <codeblock><b>
+-- Fetch the first row of T
 SELECT * FROM T FETCH FIRST ROW ONLY
+
+-- Sort T using column I, then fetch rows 11 through 20 of the sorted
+--   rows (inclusive)
 SELECT * FROM T ORDER BY I OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY
-SELECT * FROM T OFFSET 100 ROWS
-</b></codeblock> </example>
 
+-- Skip the first 100 rows of T
+-- If the table has fewer than 101 records, an empty result set is
+--   returned
+SELECT * FROM T OFFSET 100 ROWS
+</b></codeblock>
+<note>
+Make sure to specify the ORDER BY clause if you
+expect to retrieve a sorted result set.
+If you do not use an ORDER BY clause, the result set that is retrieved will
+typically have the order in which the records were inserted.</note> </example>
 </refbody>
 </reference>
-



Mime
View raw message