select * from table where f < '2004-01-08'orselect * from table where datediff( ms, f, '2004-01-08' ) > 0

解决方案 »

  1.   

    select * from table where f < '2004/01/08'
      

  2.   

    select * from table where f < ‘2004-01-08’
      

  3.   

    用select getdate()查询一下你的sql日期格式是什么,就按这个格式加引号写
      

  4.   

    select * from table where f <'2004-01-08 00:00:00'
      

  5.   

    select * from table where convert(char(10),f,120) < '2004-01-08'
      

  6.   

    select * from table where cast(convert(varchar(10),f,120)  as datetime) < '2004-01-08'
      

  7.   

    或者
    select * from table where f < '2004-01-08'
      

  8.   

    select * from table where f < '2004-01-08'
      

  9.   

    select * from table where f < '2004-01-08'