How do I query for all dates greater than a certain date in SQL Server?

后端 未结 5 966
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-27 09:18

I\'m trying:

SELECT * 
FROM dbo.March2010 A
WHERE A.Date >= 2010-04-01;

A.Date looks like: 2010-03-04 00:00:00.000

5条回答
  •  有刺的猬
    2020-11-27 09:50

    Try enclosing your date into a character string.

     select * 
     from dbo.March2010 A
     where A.Date >= '2010-04-01';
    

提交回复
热议问题