Re: it's not NULL, then what is it?

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: it's not NULL, then what is it?
Date: 2009-06-30 22:41:35
Message-ID: h2e4au$ans$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Steve Crawford wrote on 01.07.2009 00:39:
>> canon=# select count(maf) from gallo.sds_seq_reg_shw
>> canon-# where maf ISNULL;
>>
> I believe count will only count not-null

Correct

SELECT count(some_col)
FROM some_table;

is the same as

SELECT count(*)
FROM some_table
WHERE some_col IS NOT NULL;

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tena Sakai 2009-07-01 00:55:41 Re: it's not NULL, then what is it?
Previous Message Steve Crawford 2009-06-30 22:39:24 Re: it's not NULL, then what is it?