db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From unludo <unl...@gmail.com>
Subject Re: limit, offset and random
Date Wed, 09 Apr 2008 03:15:41 GMT

OK thanks a lot for your answers.

Regarding the 'ORDER BY RANDOM()', you also plan to have something similar?

regards
Ludovic


Lance Andersen-2 wrote:
> 
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/limit%2C-offset-and-random-tp16547686p16578551.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message