犯了一个错误,mysql进行字段是否为null的判断
在mysql中,查询某字段为空时,不可用 = null,而是 is null,不为空则是 is not null。
例如:
select * from table where del = 1 and `time` is null
犯了一个错误,mysql进行字段是否为null的判断
在mysql中,查询某字段为空时,不可用 = null,而是 is null,不为空则是 is not null。
例如:
select * from table where del = 1 and `time` is null