Home  >  Article  >  Database  >  mysql determines whether a field is null

mysql determines whether a field is null

藏色散人
藏色散人Original
2020-11-06 10:49:024299browse

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.

mysql determines whether a field is 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn