X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D678353758 for ; Fri, 15 Apr 2005 16:50:29 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34105-10 for ; Fri, 15 Apr 2005 19:50:21 +0000 (GMT) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by svr1.postgresql.org (Postfix) with ESMTP id E04E653879 for ; Fri, 15 Apr 2005 16:50:19 -0300 (ADT) Received: from [192.168.1.100] ([24.202.23.128]) by VL-MO-MR010.ip.videotron.ca (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)) with ESMTP id <0IF0006PM72VRM@VL-MO-MR010.ip.videotron.ca> for pgsql-jdbc@postgresql.org; Fri, 15 Apr 2005 15:49:43 -0400 (EDT) Date: Fri, 15 Apr 2005 15:53:33 -0400 From: David Gagnon Subject: Getting the number or row returned by a select. Alway tought it was not possible until I say pgAdmin who gives it In-reply-to: <425EE184.8060303@opencloud.com> To: pgsql-jdbc@postgresql.org Message-id: <42601BBD.6060307@siunik.com> 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 Thunderbird 1.0.2 (Windows/20050317) References: <20050414154508.66799.qmail@web50407.mail.yahoo.com> <425EE184.8060303@opencloud.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.015 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/91 X-Sequence-Number: 12698 Hi all, In my system I alway do a select X from Y. followed by a select count() from Y to get the number of row in my first request. I heard it was possible to get the total number of rows from a select in a VB6/MSSQL env. Today I saw in PGAdminIII that it gives the count(*) from any query that return more that 100 lines: This query return more than 100 rows (12234 rows) do you want to display them. So did I miss something obvious. Is it possible to get the total number of row returned from a query without doing another select. Thanks to confirm that :-) Have a goog week-end /David