Saw this blog piece over at Conor Cunningham’s Blog and wanted to point to it, because I never knew this behaviour.


SELECT COUNT(*) returns the number of rows in a table, but when you do SELECT COUNT(<Column>) it will return the non-null number of rows. Nifty – but behaviour which is immensely important to actually know.

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>