"; they can both be used to determine whether numbers, strings, and expressions are not equal. For "!=" and "<>", if the operands on both sides are not equal, the return value is 1, otherwise the return value is 0; if one of the operands on both sides is NULL, the return value is also NULL."/> "; they can both be used to determine whether numbers, strings, and expressions are not equal. For "!=" and "<>", if the operands on both sides are not equal, the return value is 1, otherwise the return value is 0; if one of the operands on both sides is NULL, the return value is also NULL.">

Home  >  Article  >  Database  >  What is the not equal symbol in mysql

What is the not equal symbol in mysql

青灯夜游
青灯夜游Original
2022-01-06 13:41:5212956browse

There are two types of inequality symbols in mysql: "!=" and "a8093152e673feb7aba1828c43532094"; they can both be used to determine whether numbers, strings, and expressions are not equal. For "!=" and "a8093152e673feb7aba1828c43532094", if the operands on both sides are not equal, the return value is 1, otherwise the return value is 0; if one of the operands on both sides is NULL, the return value is also NULL.

What is the not equal symbol in mysql

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

In mysql, there are two types of inequality symbols:

  • ##a8093152e673feb7aba1828c43532094

  • !=

Not equal to operator (

a8093152e673feb7aba1828c43532094 or !=) can be used for judgment Whether numbers, strings, and expressions are not equal. If the operands on both sides are not equal, the return value is 1, otherwise the return value is 0; if one of the operands on both sides is NULL, the return value is also NULL.

Example:Use a8093152e673feb7aba1828c43532094 and != to judge inequality

mysql> SELECT &#39;good&#39;<>&#39;god&#39;,1<>2,4!=4,5.5!=5,(1+3)!=(2+1),NULL<>NULL;
+---------------+------+------+--------+--------------+------------+
| &#39;good&#39;<>&#39;god&#39; | 1<>2 | 4!=4 | 5.5!=5 | (1+3)!=(2+1) | NULL<>NULL |
+---------------+------+------+--------+--------------+------------+
|             1 |    1 |    0 |      1 |            1 |       NULL |
+---------------+------+------+--------+--------------+------------+
1 row in set (0.00 sec)

As you can see from the results, the two inequality operators have the same effect. Comparison and judgment of numbers, strings, and expressions can be performed.

[Related recommendations:

mysql video tutorial]

The above is the detailed content of What is the not equal symbol in mysql. 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