When we use the NULL-safe operator in row comparison, such as (A, B) <=> (C, D), its performance is equivalent to ( A <=> C) AND (B <=> D). The following example will illustrate −
mysql> Select (100,50) <=> (50,100); +-----------------------+ | (100,50) <=> (50,100) | +-----------------------+ | 0 | +-----------------------+ 1 row in set (0.00 sec) mysql> Select (100,50) <=> (100,50); +-----------------------+ | (100,50) <=> (100,50) | +-----------------------+ | 1 | +-----------------------+ 1 row in set (0.00 sec)
The above result set shows how to use the NULL safe operator for row comparison.
The above is the detailed content of How does the MySQL NULL safe equals operator perform when used with row comparisons?. For more information, please follow other related articles on the PHP Chinese website!