Quote Originally Posted by Richard Hogg View Post
Hi Michael,
Thanks for the heads up. I did some research this quite a while ago and the advice I was given was to do a count on a single column where possible but happy to hear counter advice. Count on recnum was a suggestion only which is why I mentioned another column if necessary also perhaps should have been explicit in pointing out it should be done on a non-nullable column rather than assuming. I usually use a column that's involved in a unique index (eg recnum or other identity column) so it shouldn't contain a null value.
Cheers
Richard
there used to be at least in some dbs a speed difference with count(*) but afaik that was long ago. I prefer using count(1) because i think its the clearest and works on any db and has no issues with nulls