X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 438A4925E5C for ; Fri, 23 May 2003 08:46:57 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 52721-08 for ; Fri, 23 May 2003 08:46:24 -0400 (EDT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by developer.postgresql.org (Postfix) with SMTP id B6470925D5D for ; Fri, 23 May 2003 07:24:22 -0400 (EDT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Fri May 23 13:25:08 2003 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id NAA19092; Fri, 23 May 2003 13:24:17 +0200 (METDST) Message-ID: <3ECE04E1.86BE5143@rodos.fzk.de> Date: Fri, 23 May 2003 13:24:17 +0200 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Cc: rajendran@davlin.co.in Subject: Re: Inquiry From Form [pgsql] Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/464 X-Sequence-Number: 13629 > > I am using Java language for getting first 10 records from the table in postgres. > I dont know how to fetch 10 records from the table. > Raj > First answer is RTFM. But within psql you can fetch like this: begin; declare fu cursor for select * from foo; fetch 10 in fu; fetch 10 in fu; ... close fu; end; Does this answer your question? Regards, Christoph