>>>>> "Brian" == Brian C Doyle <[EMAIL PROTECTED]> writes:

    Brian> Hello, You will need to do "SELECT count(attribute) FROM
    Brian> table;" or SELECT count(table.attribute);"


You need to watch this:


acspg=# create table tst (
acspg(# a integer
acspg(# );
CREATE
acspg=# insert into tst values (0);
INSERT 333481 1
acspg=# insert into tst values (null);
INSERT 333482 1
acspg=# insert into tst values (2);
INSERT 333483 1
acspg=# select count(*) from tst;
 count 
-------
     3
(1 row)

acspg=# select count(a) from tst;
 count 
-------
     2
(1 row)

acspg=# select count(1) from tst;
 count 
-------
     3
(1 row)

acspg=# 


If you use the attribut name, null values won't be counted.

-Dan

Reply via email to