MySQL中的<=>
的含义和作用是什么?
发布于 2010-12-29 20:08:28
发布于 2010-12-29 20:10:31
<=>
是一种所谓的NULL
-safe-equality operator。
SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;
-> 1, 1, 0
SELECT 1 = 1, NULL = NULL, 1 = NULL;
-> 1, NULL, NULL
发布于 2010-12-29 20:14:50
与SQL标准关键字DISTINCT相同
SELECT * FROM somewhere WHERE `address1` is not distinct from `address2`
https://stackoverflow.com/questions/4553930
复制相似问题