"是什么意思?-6ren"> "是什么意思?-什么是在 MySQL 中是什么意思? 最佳答案 manual说明一切: NULL-safe equal. This operator performs an equality comparison l-6ren">
gpt4 book ai didi

mysql - MySQL中的 "<=>"是什么意思?

转载 作者:IT老高 更新时间:2023-10-28 23:57:46 26 4
gpt4 key购买 nike

什么是<=>在 MySQL 中是什么意思?

最佳答案

manual说明一切:

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 - MySQL中的 "<=>"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4553930/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com