What does <=>
in MySQL mean and do?
相关问题
- What means in Dart static type and why it differs
- sqlyog export query result as csv
- NOT DISTINCT query in mySQL
- MySQL: conduct a basic search
- Why sometimes there is one of more gap(s) in the v
It's the same as SQL standard keyword DISTINCT
The manual says it all:
NULL-safe equal to operator
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_equal-to
<=>
is a so calledNULL
-safe-equality operator.It's the NULL-safe equal operator.
The difference between <=> and = is when one or both of the operands are NULL values. For example:
Here is the full table for the
<=>
comparison of values 1, 2 and NULL:Compare to the ordinary equality operator: