--查询当天的数据
select *
from 表名
where datediff(d,日期字段名,getdate())=0

解决方案 »

  1.   

    select * from 表 where datediff(day,日期字段,getdate())=0
      

  2.   

    select * from 表 where 日期字段>convert(varchar(10),getdate(),120)
    and 日期字段<convert(varchar(10),dateadd(day,1,getdate()),120)
      

  3.   

    wangtiecheng(不知不为过,不学就是错!) ( ) 信誉:100    Blog   加为好友  2007-04-24 13:52:03  得分: 0  
     
     
       
    --查询当天的数据
    select *
    from 表名
    where datediff(d,日期字段名,getdate())=0
      
     
    这个就正确啊,还不结贴?