用SQL查询过去一天内新增的数据

怎么用SQL语句查询 从昨天早上6点到现在新增的数据? ( 告诉我Where子句即可,假设有个字段updatetime表示记录更新时间,假设现在5.59分59秒,定时任务)

第1个回答  2014-06-16
where updatetime>=convert(varchar(10),getdate()-1,120)+' 06:00:00'
第2个回答  2014-06-16
where updatetime>CONVERT(VARCHAR(50), getdate ()-1,23)+'06:00:000'
哦了本回答被提问者采纳
相似回答