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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jackson Ching" <jching(at)imvi(dot)com(dot)ph>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Getting the result of a query using COUNT(*)
Date: 2000-08-25 03:57:37
Message-ID: 753.967175857@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

"Jackson Ching" <jching(at)imvi(dot)com(dot)ph> writes:
> SELECT COUNT(*) FROM MyTable

> in my rs.getint("COUNT(*)");

Offhand I'd guess that the returned column heading is "count" not
"COUNT(*)". Use an AS clause if you want to be sure about the
column heading of a SELECT result...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexandru COSTIN 2000-08-25 06:12:07 Re: Re: [GENERAL] Getting the result of a query using COUNT(*)
Previous Message Yury Don 2000-08-25 03:31:03 Re: [GENERAL] Getting the result of a query using COUNT(*)

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-08-25 04:22:35 Re: Regular expression query
Previous Message Yury Don 2000-08-25 03:31:03 Re: [GENERAL] Getting the result of a query using COUNT(*)