<=>是什么鬼
作者:互联网
官网描述
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
.
NULL
-安全相等。此运算符执行类似于相等比较 =运算符,差别是:
如果两个操作数都是
NULL则返回1
,而不是
NULL
,
如果只一个操作数是
则返回NULL
0,而
不是NULL
。
mysql> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;
-> 1, 1, 0
mysql> SELECT 1 = 1, NULL = NULL, 1 = NULL;
-> 1, NULL, NULL
标签:rather,什么,运算符,operator,NULL,than,SELECT 来源: https://www.cnblogs.com/klarck/p/13420087.html