db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Andersen <Lance.Ander...@Sun.COM>
Subject Re: limit, offset and random
Date Tue, 08 Apr 2008 13:08:59 GMT
I believe there is an enhancement request to add LIMIT to Derby.   
While it is not part of the SQL standard, most database vendor support  
LIMIT or something similar and it is easier to use than ROW_NUMBER.   
It would be a nice feature to consider.

JDBC 4.1 we will provide a JDBC escape for LIMIT.

Regards
Lance
On Apr 8, 2008, at 4:35 AM, Dyre.Tjeldvoll@Sun.COM wrote:

> unludo <unludo@gmail.com> writes:
>
>> Hello,
>>
>> I would like to use the following constraints at the end of some  
>> queries:
>>
>> SELECT a FROM B WHERE c = 'toto' ORDER BY RANDOM() LIMIT 10;
>
> LIMIT is a non-standard extension. Derby 10.4 (soon to be released)
> includes the SQL ROW_NUMBER function which will let you do the same  
> thing,
> although with a different and slightly more verbose syntax.
>
> -- 
> dt


Mime
View raw message