Re: [GENERAL] Getting the result of a query using COUNT(*)

From: Yury Don <yura(at)vpcit(dot)ru>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: [GENERAL] Getting the result of a query using COUNT(*)
Date: 2000-08-25 03:31:03
Message-ID: 39A5E877.537238D6@vpcit.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Jackson Ching wrote:
>
> Hi,
>
> I'm using JSDK 2.0 and IBM JDK 1.3 on RedHat Linux 6.2
>
> As i test my servlet, I got errors saying count(*) column not found in a query like this
>
> SELECT COUNT(*) FROM MyTable
>
> in my rs.getint("COUNT(*)"); in oracle it works fine, in postgresql it doesn't. how should i handle aggregate functions in SQL then?
>
> Thanks
>
> Jackson

What version of rostgres do you use?
SELECT COUNT(*) FROM MyTable works pretty well in postgres 6.5.1 and
later.
Perhaps problem is in java?

--
Sincerely yours,
Yury

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-08-25 03:57:37 Re: Getting the result of a query using COUNT(*)
Previous Message ian 2000-08-25 03:30:32 where can i find a binary format win32

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-08-25 03:57:37 Re: Getting the result of a query using COUNT(*)
Previous Message Yury Don 2000-08-25 03:27:32 Re: weird structure