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, [EMAIL PROTECTED] wrote:
unludo <[EMAIL PROTECTED]> 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