Posted on 2011-11-07 11:56
Kevin Meng 阅读(250)
评论(0) 编辑 收藏
字段为Datetime,获得2011-11-05以后添加的记录
SELECT * FROM geo_corporation t WHERE TO_DAYS(t.addtime)>TO_DAYS('2011-11-05')
某一时间段内的记录
SELECT * FROM geo_corporation t WHERE TO_DAYS(t.addtime)>TO_DAYS('2011-11-05') AND TO_DAYS(t.addtime)<TO_DAYS('2011-11-7')