Re: Left Outer Join Question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Edward Murray" <mail(at)avenuedesign(dot)net>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Left Outer Join Question
Date: 2002-02-27 05:55:26
Message-ID: 20158.1014789326@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> What's probably happening is that count isn't counting NULLs?

As per spec. If you want to count records independently of whether
any particular column is NULL or not, use count(*). See the docs,
notably
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/sql-expressions.html#SYNTAX-AGGREGATES

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Edward Murray 2002-02-27 05:59:11 Re: Left Outer Join Question
Previous Message grep 2002-02-27 05:53:06 Bad design or SQL statment quandary