How to count NULL values in MySQL?

Posted by abbr on Stack Overflow See other posts from Stack Overflow or by abbr
Published on 2010-06-16T22:53:48Z Indexed on 2010/06/16 23:02 UTC
Read the original article Hit count: 124

Filed under:

I want to know how can i find all the values that are NULL in the MySQL database for example I'm trying to display all the users who don't have an average yet.

Here is the MySQL code.

SELECT COUNT(average) as num
FROM users
WHERE user_id = '$user_id'
AND average IS_NULL

© Stack Overflow or respective owner

Related posts about mysql