日期:2014-05-17 浏览次数:20478 次
select * from temp where convert(varchar(10),tempTime,120)='2012-08-08';
------解决方案--------------------
http://msdn.microsoft.com/zh-cn/library/ms187928(v=SQL.90).aspx
------解决方案--------------------
declare @time date = '2012-08-08' select * from temp where tempTime > @time and tempTime >= @time <= DATEADD(DAY,1,@time)