1、完全等于 <=>

mysql> select  null <=> null;
+---------------+
| null <=> null |
+---------------+
|             1 |
+---------------+
1 row in set

mysql> select  null <=> 18;
+-------------+
| null <=> 18 |
+-------------+
|           0 |
+-------------+
1 row in set

mysql> 

注:用于严格比较两个null值是否相等,两个操作码均为null时,其所得值为1;而当一个操作码为null时,其所得值为0。mysql 数据库系统中,1代表true,0代表false。

2、不等于 <>

mysql> select  15 <> 18;
+----------+
| 15 <> 18 |
+----------+
|        1 |
+----------+
1 row in set

mysql> 

注:<> 同 !=

相关文章:

  • 2021-12-19
  • 2021-04-22
  • 2021-06-23
  • 2021-11-14
  • 2021-08-01
  • 2021-07-12
  • 2021-10-03
  • 2021-08-26
猜你喜欢
  • 2021-12-02
相关资源
相似解决方案