日期:2014-05-18 浏览次数:20493 次
declare @m table (col datetime) insert into @m select '2011-10-01' union all select '2011-11-01' union all select '2011-12-01' select * from @m where col >= {d'2011-10-31'} /* col ----------------------- 2011-11-01 00:00:00.000 2011-12-01 00:00:00.000 */ DECLARE @t DATETIME SET @t=GETDATE() SELECT CONVERT(VARCHAR(10),@t,120) SELECT CAST(@t AS int) /* 2011-11-03 40849 */
------解决方案--------------------
select * from mzypmxk_f where mzypmxk_f.rq >='2011-10-31'
------解决方案--------------------
http://msdn.microsoft.com/en-us/library/ms180878.aspx
官方给出的列表介绍得很详细。