Hi Victor, generally, none of the PostgreSQL/MySQL features "LIMIT" nor "OFFSET" does exist. But you may use some other functionality to reach similar results:
for "LIMIT": By using the setMaxRows() feature of Statement, you may limit the amount or rows that are returned and processed for the query. This may increase performance if the result set would be large, and you are interested only e.g. in the first 10. (The JDBC driver will otherwise fetch as much rows as will fit into the packet size, even if they are not necessary because of you want only 10). You may also use the additinal qualification ROWNUM < N in your WHERE clause, but be aware that the ROWNUM clause is applied before sorting takes place. for "OFFSET": The result set object returned by a query is scrollable by default, so you may use any of resultset navigation methods to navigate, and these methods do not pick up the complete data while moving to the requested position, so they are relatively efficient. To combine both, you may want to call setMaxRows(LIMIT + OFFSET). Regards Alexander Schr�der SAP Labs Berlin > -----Original Message----- > From: Victor Batista [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 25, 2003 1:23 PM > To: [EMAIL PROTECTED] > Subject: LIMIT and OFFSET keywords > > > Hello! > Is there any thing in SapDB equivalent to "LIMIT" and > "OFFSET" (LIMIT N > OFFSET N1)? > I am using SapDB 7.4.03 with JBoss 3.0.4. I want to > make queries which > return only a subset of the SELECT results. > > Thanks in advance, > Victor Batista > > -------------------------------------------- > Victor Nelson Marques Batista > > http://www.present-technologies.com > > Present Technologies, Lda. > Praceta Alberto de Oliveira, 18 - 1� > 3000 - 015 Coimbra > PORTUGAL > > Phone (+351) 239 781834 > Fax (+351) 239 781835 > > mailto:[EMAIL PROTECTED] > -------------------------------------------- > > _______________________________________________ > sapdb.general mailing list > [EMAIL PROTECTED] > http://listserv.sap.com/mailman/listinfo/sapdb.general > _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
