Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 78154 invoked from network); 23 Jan 2006 16:40:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Jan 2006 16:40:28 -0000 Received: (qmail 90041 invoked by uid 500); 23 Jan 2006 16:40:26 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 90016 invoked by uid 500); 23 Jan 2006 16:40:26 -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 90004 invoked by uid 99); 23 Jan 2006 16:40:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2006 08:40:25 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.36] (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2006 08:40:25 -0800 Received: from phys-gadget-1 ([129.156.85.171]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id k0NGdxuf026419 for ; Mon, 23 Jan 2006 09:40:04 -0700 (MST) Received: from conversion-daemon.gadget-mail1.uk.sun.com by gadget-mail1.uk.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0ITK00D010XR52@gadget-mail1.uk.sun.com> (original mail from Kristian.Waagan@Sun.COM) for derby-user@db.apache.org; Mon, 23 Jan 2006 16:39:59 +0000 (GMT) Received: from [129.159.112.188] (khepri17.Norway.Sun.COM [129.159.112.188]) by gadget-mail1.uk.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTPA id <0ITK00H810YM8P@gadget-mail1.uk.sun.com> for derby-user@db.apache.org; Mon, 23 Jan 2006 16:39:59 +0000 (GMT) Date: Mon, 23 Jan 2006 17:39:58 +0100 From: Kristian Waagan Subject: Re: first n rows In-reply-to: <200601231607.k0NG77EY007442@intranet.chand.mahindrabt.com> To: Derby Discussion Message-id: <43D506DE.5080507@Sun.com> Organization: Sun Microsystems Inc. MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7.12) Gecko/20050930 Thunderbird/1.0.7 Mnenhy/0.7.2.0 References: <200601231607.k0NG77EY007442@intranet.chand.mahindrabt.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Binu Andrews wrote: > hi, > any one pls tell me how to fetch first or last n number of rows from a > derby table using SELECT clause Hello, As stated in the Derby FAQ (http://db.apache.org/derby/faq.html), Derby supports getting a limited number of rows through JDBC. java.sql.Statement.setMaxRows(); When speaking of 'first' and 'last', I reckon you are referring to a an ordering determined by an ORDER BY clause. hope this helps, -- Kristian > > > thanks in advance > > Binu > ********************************************************* > Disclaimer: > The contents of this E-mail (including the contents of the enclosure(s) > or attachment(s) if any) are privileged and confidential material of MBT > and should not be disclosed to, used by or copied in any manner by > anyone other than the intended addressee(s). In case you are not the > desired addressee, you should delete this message and/or re-direct it to > the sender. The views expressed in this E-mail message (including the > enclosure(s) or attachment(s) if any) are those of the individual > sender, except where the sender expressly, and with authority, states > them to be the views of MBT. > > This e-mail message including attachment/(s), if any, is believed to be > free of any virus. However, it is the responsibility of the recipient to > ensure that it is virus free and MBT is not responsible for any loss or > damage arising in any way from its use > > ******************************************************** >