Getting the result of a query using COUNT(*)

From: "Jackson Ching" <jching(at)imvi(dot)com(dot)ph>
To: pgsql-general(at)postgresql(dot)org
Subject: Getting the result of a query using COUNT(*)
Date: 2000-08-25 16:37:57
Message-ID: 200008250937570530.005FD1CF@mail.imvi.com.ph
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2000-08-25 17:28:03 Re: alter table and constraints
Previous Message Bruce Guenter 2000-08-25 15:35:43 Stripping a prefix

Browse pgsql-sql by date

  From Date Subject
Next Message Rini Dutta 2000-08-25 19:20:59 queries and inserts
Previous Message hlefebvre 2000-08-25 15:22:26 Re: Re: Date of creation and of change