...
canon=# select count(maf) from gallo.sds_seq_reg_shw
canon-# where maf ISNULL;
count
-------
0
(1 row)
I believe count will only count not-null anyway so this will always
return zero. Try count(*) instead of count(maf). Here's an example:
st...@[local]=> select * from barr;
LOG: duration: 0.226 ms
a | b
---+---
a | b
c | d
| e
(3 rows)
st...@[local]=> select coalesce(a, 'a is null'), coalesce(b, 'b is
null') from barr;
LOG: duration: 0.283 ms
coalesce | coalesce
-----------+----------
a | b
c | d
a is null | e
(3 rows)
st...@[local]=> select count(a) from barr;
LOG: duration: 0.339 ms
count
-------
2
(1 row)
st...@[local]=> select count(*) from barr where a isnull;
LOG: duration: 0.350 ms
count
-------
1
(1 row)
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql