db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: row limits in derby?
Date Fri, 06 May 2005 18:27:46 GMT
>>>>>>>>>>>> grafpoo@comcast.net wrote (2005-05-06 18:24:11):
from
>what i can tell, and from looking at the hibernate DerbyDialect,
>derby does not support "row limit" queries, i.e. queries where i
>restrict the returned rows to some chunk (e.g. "first 20 rows" or
>"rows 51-100").
> 
> true?
> 
> sidenote: row limits - is that what they are called? if not, that
> could explain why i can't find any reference to them in the docs
> 
> thnaks

Maybe not exactly what you're askin for, but JDBC Statement has two
methods for limiting the number of rows fetched, depending on what you
actually want:

	void setMaxRows(int max)
          Sets the limit for the maximum number of rows that any
          ResultSet object can contain to the given number.

	void setFetchSize(int rows)
          Gives the JDBC driver a hint as to the number of rows that
          should be fetched from the database when more rows are
          needed.



-- 
Bernt Marius Johnsen, Database Technology Group, Sun Microsystems, Norway

Mime
View raw message