Home  >  Article  >  Database  >  How to use MySQL database to determine that the NULL result is 1?

How to use MySQL database to determine that the NULL result is 1?

黄舟
黄舟Original
2017-08-07 15:52:382968browse

There is a null in the MySQL database. Using comparison operators, under what circumstances the result returns 1. The comparison operator is used below to determine the result returned by null. The specific operation is as follows:

How to use MySQL database to determine that the NULL result is 1?

1. The comparison operator "=" cannot compare NULL, use The result of "=" comparison is null, as shown in the following figure:

How to use MySQL database to determine that the NULL result is 1?


##2. The comparison operator "" cannot be used for NULL comparison, and the returned result is null, as shown in the following figure:

How to use MySQL database to determine that the NULL result is 1?


##3. The comparison operator ">" cannot be used to compare NULL, and the returned result is null, as shown below Shown:

How to use MySQL database to determine that the NULL result is 1?


##4. Comparison operators "

How to use MySQL database to determine that the NULL result is 1?


#5. The comparison operator "" can correctly compare NULL and the return value is 1, as shown in the following figure:

How to use MySQL database to determine that the NULL result is 1?6. The comparison operator ">=" cannot be used to compare NULL, and the returned result is null, as shown in the following figure:

How to use MySQL database to determine that the NULL result is 1?

Notice

Familiar with the precedence of comparison operatorsUnderstand the comparison method of NULL values

The above is the detailed content of How to use MySQL database to determine that the NULL result is 1?. 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