select * from tab where ctime='今天'ctime是datetime类型的.

解决方案 »

  1.   

    select * from tab where ctime >= '2009-11-11 0:0:0' and ctime <= '2009-11-11 23:59:59'
      

  2.   

    在代码中你要用到FormatDateTime函数
      

  3.   

    sql server
    select * from tab where ctime = getdate()
      

  4.   

    SQL 里面下面的语句就能实现。
    select * from tab where ctime = getdate() 
      

  5.   

    select count(*) from tab where convert(char(8),ctime,112) = convert(char(8),getdate(),112)
    试试这段
      

  6.   


    select * from tab where ctime=today
      

  7.   


    uses DateUtils;select * from tab where ctime=today
      

  8.   

    select * from tab where datepart(ctime,YYYY) = datepart(getdate(),YYYY) and datepart(ctime,MM) = datepart(getdate(),MM) and datepart(ctime,DD) = datepart(getdate(),DD)