Home > Database > Mysql Tutorial > mysql determines whether a field is null

mysql determines whether a field is null

藏色散人
Release: 2020-11-06 10:49:38
Original
4484 people have browsed it

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
Copy after login

MySQL query field is not empty NULL syntax

WHERE field IS NOT NULL
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template