How to count NULL values in MySQL?

前端 未结 7 1152
猫巷女王i
猫巷女王i 2021-02-04 03:56

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 i

7条回答
  •  野性不改
    2021-02-04 04:43

    A bit late but you can do it in MySQL 5.0.51:

    SELECT COUNT(*) AS total, COUNT(field1) AS notNullFields1
    FROM table
    GROUP BY field5, field6
    

    Regards.

提交回复
热议问题