sql server 查询当天数据

select * from score_get where  substring(Convert(char(10),get_time,112),1,8)='20160325' 

select * from score_get where get_time between '2016-03-25 00:00:00' and '2016-03-25 23:59:59' 

select * from score_get where year(get_time) = 2016 and month(get_time)= 03 and day(get_time) = 25

select * from score_get where get_time > '2016-03-25' and get_time < '2016-03-26'

 

你可能感兴趣的:(sql server 查询当天数据)