Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 54869 invoked from network); 17 Feb 2006 09:01:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Feb 2006 09:01:22 -0000 Received: (qmail 21917 invoked by uid 500); 17 Feb 2006 09:01:21 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 21563 invoked by uid 500); 17 Feb 2006 09:01:20 -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 21552 invoked by uid 99); 17 Feb 2006 09:01:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2006 01:01:19 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of legolas.w@gmail.com designates 66.249.92.205 as permitted sender) Received: from [66.249.92.205] (HELO uproxy.gmail.com) (66.249.92.205) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2006 01:01:19 -0800 Received: by uproxy.gmail.com with SMTP id s2so231894uge for ; Fri, 17 Feb 2006 01:00:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type; b=oaguqdVm2/c4T4adps3lRIfwJ41dAU+tsW8X0p7rO+xnl0wi0LjyR+PlHRbsYpjwxl0SDqCNyTtQTzGnBG80zBeTOvfGcPzBmoaVJ4CTC9IqBbLUvLerJyRhTcEq64X6o7cYZ2hMDh9S8qO2ayB2Y8I2VrfKlOSHFRNvC2jde68= Received: by 10.67.26.19 with SMTP id d19mr512308ugj; Fri, 17 Feb 2006 01:00:54 -0800 (PST) Received: from ?62.60.184.82? ( [62.60.184.82]) by mx.gmail.com with ESMTP id a1sm315177ugf.2006.02.17.01.00.49; Fri, 17 Feb 2006 01:00:53 -0800 (PST) Message-ID: <43F590B3.1000400@gmail.com> Date: Fri, 17 Feb 2006 12:30:35 +0330 From: Legolas Woodland User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Derby Discussion Subject: Re: Using/Adressing a "row number" in a SELECT query References: <334d65b80602162347m6836e8c8uf0874aebd89f4697@mail.gmail.com> In-Reply-To: <334d65b80602162347m6836e8c8uf0874aebd89f4697@mail.gmail.com> Content-Type: multipart/alternative; boundary="------------000602050900080205040208" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------000602050900080205040208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sylvain RICHET wrote: > Hi everyone, > > In a selection statement, i would like to get blocks of records. > Thus, i need to filter records by a "row number", directly at the > SELECT level. > > It seems that the way to address a row number is not (SQL) standard. > (different "proprietary" implementations) > > In Oracle, there is the "rowid". > In MySQL, the "LIMIT" clause can do it. > In SQL Server, i think there is the "ROW_NUMBER() OVER..." > In DB2 (on AS/400) , there is the "RRN" (Relative Record Number)... > > What about Derby database ? > How is it implemented on this server ? > > I know i could use > > Thanks in advance. Derby sql does not has any facilities for limiting number of rows in select statement. you can just limit the fetch size in JDBC resultSets. --------------000602050900080205040208 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sylvain RICHET wrote:
Hi everyone,

In a selection statement, i would like to get blocks of records.
Thus, i need to filter records by a "row number", directly at the SELECT level.

It seems that the way to address a row number is not (SQL) standard.
(different "proprietary" implementations)

In Oracle, there is the "rowid".
In MySQL, the "LIMIT" clause can do it.
In SQL Server, i think there is the "ROW_NUMBER() OVER..."
In DB2 (on AS/400) , there is the "RRN" (Relative Record Number)...

What about Derby database ?
How is it implemented on this server ?

I know i could use

Thanks in advance.
Derby sql does not has any facilities for limiting number of rows in select statement.
you can just limit the fetch size in JDBC resultSets.

--------------000602050900080205040208--