Mysql method to determine whether it is null: 1. Use the syntax "WHERE filed IS NULL" to query if the field is empty; 2. Use the syntax "WHERE field IS NOT NULL" to query if the field is not empty NULL.
Recommended: "mysql video tutorial"
MySQL determines whether a field is NULL
Question
When using MySQL database to determine whether the value of a field is NULL:
Exception occurs when using field == NULL
Use field != NULL Exception occurred
Solution
MySQL query field is empty NULL syntax
WHERE filed IS NULL
MySQL query field is not empty NULL syntax
WHERE field IS NOT NULL
The above is the detailed content of mysql determines whether a field is null. For more information, please follow other related articles on the PHP Chinese website!