jpfss
mysql中时间字段datetime怎么判断为空和不为空
一般为空都用null表示,所以一句sql语句就可以。

select * from 表名 where 日期字段 is null;
这里要注意null的用法,不可以用=null这样的形式表示。


相反,要取出不为空的数据,就是is true
select * from 表名 where 日期字段 is true;

分类:

技术点:

相关文章:

  • 2022-01-07
  • 2021-10-16
  • 2022-12-23
  • 2021-08-30
  • 2021-12-10
  • 2021-05-20
  • 2022-12-23
猜你喜欢
  • 2021-12-10
  • 2022-12-23
  • 2021-11-02
  • 2021-12-10
  • 2022-12-23
  • 2021-10-03
  • 2021-11-18
相关资源
相似解决方案