db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Newsham" <jnews...@referentia.com>
Subject limit in select
Date Wed, 25 Oct 2006 02:27:42 GMT
 

Hi, 

 

Is there a jira issue for adding a limit statement (to limit the number of
records returned) to a select statement?  I did a jira search but could find
no such issue.  I'd like to vote for it.

 

I also searched the mailing list for discussions regarding this feature, and
responses which see no reason to support it generally say: (1) you can get
this functionality using Statement.setMaxRows(), and (2) "limit" is
non-standard sql.

 

I'd specifically like to see limit support at the sql query level, as
setMaxRows() can't be used to limit the number of records returned in a
subquery (which I need).  Furthermore, if you're generating sql queries
programmatically (such as I am), and don't have access to the Statement
object which will perform the query, setMaxRows() can't be used in this case
either.  As for "limit" being non-standard, people who need to stick to
standard sql are free to avoid this feature.

 

Thanks,

Jim


Mime
View raw message