From konkodi221@rediffmail.com Wed Feb 22 09:14:07 2006 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 031CD9DCA43 for ; Wed, 22 Feb 2006 05:14:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 65153-03 for ; Wed, 22 Feb 2006 05:14:08 -0400 (AST) X-Greylist: delayed 00:06:37.721462 by SQLgrey- Received: from rediffmail.com (unknown [203.199.83.35]) by postgresql.org (Postfix) with SMTP id 0E1F99DC893 for ; Wed, 22 Feb 2006 05:14:03 -0400 (AST) Received: (qmail 17854 invoked by uid 510); 22 Feb 2006 09:06:57 -0000 Date: 22 Feb 2006 09:06:57 -0000 Message-ID: <20060222090657.17853.qmail@webmail49.rediffmail.com> Received: from unknown (220.227.202.145) by rediffmail.com via HTTP; 22 feb 2006 09:06:55 -0000 MIME-Version: 1.0 From: "padmanabha konkodi" Reply-To: "padmanabha konkodi" To: pgsql-sql@postgresql.org Subject: restircting rows Content-type: multipart/alternative; boundary="Next_1140599215---0-203.199.83.35-17776" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=3.764 required=5 tests=[AWL=-0.305, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_WHOIS=0.879, HTML_IMAGE_ONLY_08=2.435, HTML_MESSAGE=0.001, HTML_SHORT_LINK_IMG_1=0.275, MSGID_FROM_MTA_HEADER=0] X-Spam-Score: 3.764 X-Spam-Level: *** X-Archive-Number: 200602/257 X-Sequence-Number: 24267 This is a multipart mime message --Next_1140599215---0-203.199.83.35-17776 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =0A =0Ahi all,=0A=0Amy query return 100 rows but if i am intrested only = from 40-60 rows then how to restrict.=0A=0Afor example=0A=0Aselect * from s= tudents (returns 100 rows).but i am intrested only rows from 40 to 60. --Next_1140599215---0-203.199.83.35-17776 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

=0A 
=0A 
=0Ahi all,
=0A
=0Amy query return 100 = rows but if i am intrested only from 40-60 rows then how to restrict.
= =0A
=0Afor example
=0A
=0Aselect * from students (returns 100 rows= ).but i am intrested only rows from 40 to 60.=0A

=0A

=0A=0A --Next_1140599215---0-203.199.83.35-17776-- From dev@archonet.com Wed Feb 22 09:21:09 2006 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3AEC69DCB4C for ; Wed, 22 Feb 2006 05:21:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79707-01 for ; Wed, 22 Feb 2006 05:21:10 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id E1D719DCB5E for ; Wed, 22 Feb 2006 05:21:06 -0400 (AST) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by svr4.postgresql.org (Postfix) with ESMTP id 345325AF02E for ; Wed, 22 Feb 2006 09:21:09 +0000 (GMT) Received: from [213.162.97.75] (helo=mail.metronet.co.uk) by ptb-relay03.plus.net with esmtp (Exim) id 1FBqBG-0004RR-IG; Wed, 22 Feb 2006 09:21:06 +0000 Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 6B92140D4C4; Wed, 22 Feb 2006 09:18:28 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 277C215EA6; Wed, 22 Feb 2006 09:18:28 +0000 (GMT) Message-ID: <43FC2C63.8000006@archonet.com> Date: Wed, 22 Feb 2006 09:18:27 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: padmanabha konkodi Cc: pgsql-sql@postgresql.org Subject: Re: restircting rows References: <20060222090657.17853.qmail@webmail49.rediffmail.com> In-Reply-To: <20060222090657.17853.qmail@webmail49.rediffmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.118 required=5 tests=[AWL=0.118] X-Spam-Score: 0.118 X-Spam-Level: X-Archive-Number: 200602/260 X-Sequence-Number: 24270 padmanabha konkodi wrote: > > > hi all, > > my query return 100 rows but if i am intrested only from 40-60 rows > then how to restrict. > > for example > > select * from students (returns 100 rows).but i am intrested only > rows from 40 to 60. SELECT * FROM student ORDER BY something LIMIT 20 OFFSET 40; Be aware that this will have to fetch 60 rows and throw the first 40 away. -- Richard Huxton Archonet Ltd From andreas.kretschmer@schollglas.com Wed Feb 22 09:19:45 2006 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 05E209DCAAE for ; Wed, 22 Feb 2006 05:19:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63667-10 for ; Wed, 22 Feb 2006 05:19:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by postgresql.org (Postfix) with ESMTP id 1217C9DCAAB for ; Wed, 22 Feb 2006 05:19:39 -0400 (AST) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de (node=mrelayeu9) with ESMTP (Nemesis), id 0ML2xA-1FBq9t0uqi-0000gu; Wed, 22 Feb 2006 10:19:41 +0100 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1FBq9s-0000ZG-00 for pgsql-sql@postgresql.org; Wed, 22 Feb 2006 10:19:40 +0100 Date: Wed, 22 Feb 2006 10:19:40 +0100 From: "A. Kretschmer" To: pgsql-sql@postgresql.org Subject: Re: restircting rows Message-ID: <20060222091939.GD30367@webserv.wug-glas.de> Mail-Followup-To: "A. Kretschmer" , pgsql-sql@postgresql.org References: <20060222090657.17853.qmail@webmail49.rediffmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060222090657.17853.qmail@webmail49.rediffmail.com> X-DEST: 208 X-OS: Linux - weil ich es mir Wert bin! X-Info: registrierter Linux-User 97922 http://counter.li.org User-Agent: mutt-ng 1.5.9i (Linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:51ea9561fc3f6d9539a2acd743e4748c X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.503 required=5 tests=[AWL=0.503] X-Spam-Score: 0.503 X-Spam-Level: X-Archive-Number: 200602/259 X-Sequence-Number: 24269 am 22.02.2006, um 9:06:57 -0000 mailte padmanabha konkodi folgendes: > > > hi all, > > my query return 100 rows but if i am intrested only from 40-60 rows then how to restrict. > > for example > > select * from students (returns 100 rows).but i am intrested only rows from 40 to 60. select * from students limit 20 offset 40; HTH, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47215, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe === From grzm@myrealbox.com Wed Feb 22 09:23:37 2006 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 349039DC86B for ; Wed, 22 Feb 2006 05:23:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 66363-06 for ; Wed, 22 Feb 2006 05:23:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [151.155.5.143]) by postgresql.org (Postfix) with ESMTP id 494DE9DC857 for ; Wed, 22 Feb 2006 05:23:33 -0400 (AST) Received: from [172.16.1.187] grzm [61.197.227.146] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.6 $ on Linux; Wed, 22 Feb 2006 02:23:35 -0700 In-Reply-To: <20060222090657.17853.qmail@webmail49.rediffmail.com> References: <20060222090657.17853.qmail@webmail49.rediffmail.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: restircting rows Date: Wed, 22 Feb 2006 18:23:40 +0900 To: "padmanabha konkodi" X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.414 required=5 tests=[AWL=0.414] X-Spam-Score: 0.414 X-Spam-Level: X-Archive-Number: 200602/261 X-Sequence-Number: 24271 On Feb 22, 2006, at 18:06 , padmanabha konkodi wrote: > my query return 100 rows but if i am intrested only from 40-60 rows > then how to restrict. > > for example > > select * from students (returns 100 rows).but i am intrested only > rows from 40 to 60. See LIMIT and OFFSET. http://www.postgresql.org/docs/8.1/interactive/sql-select.html#SQL-LIMIT Michael Glaesemann grzm myrealbox com