db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: limit, offset and random
Date Tue, 08 Apr 2008 08:35:58 GMT
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