mysql 遇到的大坑,!= NULL 和 is not null

有屎以来最丑的坑:

MySQL [general_growth]> select "d" != null ;
+-------------+
| "d" != null |
+-------------+
|        NULL |
+-------------+
1 row in set (0.00 sec)

MySQL [general_growth]> select "d" is not null ;
+-----------------+
| "d" is not null |
+-----------------+
|               1 |
+-----------------+
1 row in set (0.00 sec)

MySQL [general_growth]> select "d" != "" ;
+-----------+
| "d" != "" |
+-----------+
|         1 |
+-----------+
1 row in set (0.01 sec)
 

别问我为什么,问就是不知道

你可能感兴趣的:(sql,数据库)