mysql中的空值问题

Posted I am Codeman~

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql中的空值问题相关的知识,希望对你有一定的参考价值。

MySQL的查询如果需要用到空值的情况下,where后面的条件就需要注意了

 

MySQL中的表示空值的方法:is null 和 is not null

比如:select * from user where id = null -->这就是错误的写法

应该写成:select * from user where id is null

以上是关于mysql中的空值问题的主要内容,如果未能解决你的问题,请参考以下文章