select * from tab where ??????记录日期的列名是 KT_CREATE_TIME 类型为DATE 数据库为 oracle

解决方案 »

  1.   

    select * from tab where KT_CREATE_TIME = sysdate
      

  2.   

    select * from tab where KT_CREATE_TIME >= to_date(select sysdate from dual,'yyyy/mm/dd')
      

  3.   

    额,今天?select * from tab where to_char(KT_CREATE_TIME,'YYYYDD') = to_char(sysdate,'YYYYDD')
      

  4.   

    select * from tab where KT_CREATE_TIME >= to_date(sysdate,'yyyy/mm/dd')
      

  5.   

    select * from tab where to_char(KT_CREATE_TIME,'YYYYMMDD') = to_char(sysdate,'YYYYMMDD') 
      

  6.   

    用下面的就可以了
    select * from inviomaster where convert(varchar(10),KT_CREATE_TIME,120)=convert(varchar(10),getdate(),120)
      

  7.   

    忘记了,inviomaster就是你的table
      

  8.   

    oracle提供的函数trunc,截止到日期,好像这样就可以
    select * from tab where trunc(KT_CREATE_TIME) = trunc(sysdate) 
      

  9.   

    select * from tablename where datediff(day,KT_CREATE_TIME,getdate())=1
      

  10.   


    SELECT * FROM TABLE WHERE DATEDIFF(DAY,FIELD,GETDATE())=0