select * from tb
where dt>='2007-10-01' and dt<dateadd(dd,1,'2008-10-01')

解决方案 »

  1.   

    select * from tb where 时间列 between '2007-10-01' and '2008-10-1'
      

  2.   

    select * from tb
    where dt>='2007-10-01' and dt<dateadd(dd,1,'2008-10-01')
    请问下括号里的dd,1代表什么意思 ?
      

  3.   

    dd是天,就是小于你给的日期加一天后的那个日期,相当于select * from tb
    where dt>='2007-10-01' and dt <'2008-10-02'
      

  4.   

    求一天的可以select * from tb
    where datediff(dd,'2007-10-01')=0
    --或select * from tb
    where convert(varchar(10),dt,120)='2007-10-01'