2 ms·
Just be careful not to use * , count does not always ignore NULLS, if you specify a column, it ignores NULLS, if you use * then it counts it (this is on SQL
by RmDen 7y ago
Just be careful not to use * , count does not always ignore NULLS, if you specify a column, it ignores NULLS, if you use * then it counts it (this is on SQL Server btw... might be different on other platforms)
create table foo(bar int)
insert foo values(1),(null),(2)
select count(*), count(bar) from foo
3 2