On 10 Nov 2013, at 12:34pm, John McKown <john.archie.mck...@gmail.com> wrote:

> If you need a particular "default" value instead of a NULL, use the
> coalesce() function.
> 
> select coalesce(max(current_rank),0) FROM playersinleague WHERE id = 1;

Purely for clarity's sake, and not to say coalesce() doesn't work, I suggest 
you use ifnull() instead.

Also, I agree with John's analysis: max() of zero items is NULL.  I'm not sure 
what stdev() of zero items is, but fortunately SQLite doesn't have that 
function.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to