“< =>"是什么意思?在MySQL中是什么意思? [英] What does "<=>" in MySQL mean?
本文介绍了“< =>"是什么意思?在MySQL中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
MySQL中的<=>
的含义和作用是什么?
What does <=>
in MySQL mean and do?
推荐答案
手册全部说明:
NULL安全等于.这个运算符 执行像这样的相等比较 =运算子,但传回1 如果两个操作数均为NULL,则返回NULL, 如果一个操作数,则返回0而不是NULL 是NULL.
NULL-safe equal. This operator performs an equality comparison like the = operator, but returns 1 rather than NULL if both operands are NULL, and 0 rather than NULL if one operand is NULL.
mysql> select NULL <=> NULL;
+---------------+
| NULL <=> NULL |
+---------------+
| 1 |
+---------------+
1 row in set (0.00 sec)
mysql> select NULL = NULL;
+-------------+
| NULL = NULL |
+-------------+
| NULL |
+-------------+
1 row in set (0.00 sec)
mysql> select NULL <=> 1;
+------------+
| NULL <=> 1 |
+------------+
| 0 |
+------------+
1 row in set (0.00 sec)
mysql> select NULL = 1;
+----------+
| NULL = 1 |
+----------+
| NULL |
+----------+
1 row in set (0.00 sec)
mysql>
这篇关于“< =>"是什么意思?在MySQL中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文