MySQL中的Null

来源:互联网 发布:java抽奖概率算法控制 编辑:程序博客网 时间:2024/06/05 04:53


空值不一定等于空字符
空置不一定为空

mysql中查询字段为null或者不为null
在mysql中,查询某字段为空时,不可用 = null,
而是 is null,不为空则是 is not null 

select * from table where column is null;
select * from table where column is not null;



select * from table where column =''
select * from table where ISNULL(column)





0 0
原创粉丝点击