" means "safe equal" and is a comparison operator, similar to the "=" equal operator, but "<=>" can be used to determine NULL values: when two operands When both are NULL, the return value is 1 instead of NULL; and when one operand is NULL, the return value is 0 instead of NULL."/> " means "safe equal" and is a comparison operator, similar to the "=" equal operator, but "<=>" can be used to determine NULL values: when two operands When both are NULL, the return value is 1 instead of NULL; and when one operand is NULL, the return value is 0 instead of NULL.">
Home >Database >Mysql Tutorial >What does <=> mean in mysql
In mysql, "96b4fef55684b9312718d5de63fb7121" means "safe equal". It is a comparison operator, similar to the "=" equal operator, but "96b4fef55684b9312718d5de63fb7121" can be used To judge the NULL value: when both operands are NULL, the return value is 1 instead of NULL; and when one operand is NULL, the return value is 0 instead of NULL.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
Safe equals operator (<span style="font-size: 18px;">96b4fef55684b9312718d5de63fb7121</span>
)
96b4fef55684b9312718d5de63fb7121
operator is similar to the =
equals operator, but 96b4fef55684b9312718d5de63fb7121
can be used to determine NULL values, specific syntax The rules are:
When both operands are NULL, the return value is 1 instead of NULL;
And when a When the operand is NULL, the return value is 0 instead of NULL.
##Example: Use 96b4fef55684b9312718d5de63fb7121 to make an equal judgment
mysql> SELECT 1<=>0,'2'<=>2,2<=>2,'0.02'<=>0,'b'<=>'b',(1+3) <=> (2+1),NULL<=>NULL; +-------+---------+-------+------------+-----------+-----------------+-------------+ | 1<=>0 | '2'<=>2 | 2<=>2 | '0.02'<=>0 | 'b'<=>'b' | (1+3) <=> (2+1) | NULL<=>NULL | +-------+---------+-------+------------+-----------+-----------------+-------------+ | 0 | 1 | 1 | 0 | 1 | 0 | 1 | +-------+---------+-------+------------+-----------+-----------------+-------------+ 1 row in set (0.00 sec)As you can see from the result,
<=> ; has a similar function to
= when performing comparison operations. The only difference is that
96b4fef55684b9312718d5de63fb7121 can be used to judge NULL, both of which are The return value is 1 when NULL.
mysql video tutorial]
The above is the detailed content of What does <=> mean in mysql. For more information, please follow other related articles on the PHP Chinese website!