mysql中的“<=>”是比较运算符,用来严格比较两个NULL值是否相等。两个操作码均为NULL时,其所得值为1;而当一个操作码为NULL时,其所得值为0
示例:
mysql> select 2<=>3; +-------+ | 2<=>3 | +-------+ | 0 | +-------+ mysql> select null=null; +-----------+ | null=null | +-----------+ | NULL | +-----------+ mysql> select null<=>null; +-------------+ | null<=>null | +-------------+ | 1 | +-------------+
推荐:MySQL教程