码迷,mamicode.com
首页 > 数据库 > 详细

mysql中查询时间为空的数据

时间:2016-01-25 22:52:46      阅读:306      评论:0      收藏:0      [点我收藏+]

标签:

mysql表中datetime类型的字段名createtime,查询所有createtime为空的语句如下:

select * from yy_business where ISNULL(createtime) is TRUE
update yy_business set createtime=‘2015-01-21 17:24:58‘ where ISNULL(createtime) is TRUE

mysql中查询时间为空的数据

标签:

原文地址:http://www.cnblogs.com/sdfiggtx/p/5158888.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!