Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 97670 invoked from network); 8 Apr 2008 05:26:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Apr 2008 05:26:48 -0000 Received: (qmail 67080 invoked by uid 500); 8 Apr 2008 05:26:47 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 67046 invoked by uid 500); 8 Apr 2008 05:26:47 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 67035 invoked by uid 99); 8 Apr 2008 05:26:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2008 22:26:47 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Apr 2008 05:25:56 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Jj6LX-0004Tt-Pc for derby-user@db.apache.org; Mon, 07 Apr 2008 22:26:15 -0700 Message-ID: <16547686.post@talk.nabble.com> Date: Mon, 7 Apr 2008 22:26:15 -0700 (PDT) From: unludo To: derby-user@db.apache.org Subject: limit, offset and random MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: unludo@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org 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; It is supposed to return 10 values randomly from the B table. In fact I use that with postgresql. Also if someone knows if ejbql supports a random() like operator in the order by (I could not find it anywhere). Thanks in advance, any help much appreciated. Ludovic -- View this message in context: http://www.nabble.com/limit%2C-offset-and-random-tp16547686p16547686.html Sent from the Apache Derby Users mailing list archive at Nabble.com.