count(1) return 0? - Mailing list pgsql-general

From Zak McGregor
Subject count(1) return 0?
Date
Msg-id 20040301021456.77bc2dd2.zak@mighty.co.za
Whole thread Raw
Responses Re: count(1) return 0?
Re: count(1) return 0?
Re: count(1) return 0?
List pgsql-general
Hi all

is it possible to get a count(1) statemment, for example here:

select count(1) from results where fixture=4916 and winner=away group by winner;

to return a 0 value instead of absolutely nothing if no rows match fixture=4916
and winner=away? I get absolutely no results at all.


select count(1) from results where fixture=4916 and winner=home group by winner;
 count
-------
(0 rows)

any ideas please?

Thanks

ciao

Zak

--
========================================================================
http://www.carfolio.com/        Searchable database of 10 000+ car specs
========================================================================

pgsql-general by date:

Previous
From: Zak McGregor
Date:
Subject: Re: dumping fields from Perl
Next
From: Bill Moran
Date:
Subject: Re: count(1) return 0?