select * from table where trunc(sysdate)=trunc(you_time)

解决方案 »

  1.   

    SELECT * FROM TABLE
    WHERE to_char(column_Date,'yyyymmddhh24mmss')  > '20030423000000' //FROM_DATE
    AND to_char(column_Date,'yyyymmddhh24mmss')  < '20030423115959'  //END_DATE
      

  2.   

    select * from table where year(columndate)=year(currentdate) and month(columndate)=month(currentdate) and day(columndate)=day(currentdate)
    如果就要查当然的话,那currentdate=getdate()
      

  3.   

    没错就是  george_yingjun(竹子)
    所说的
      

  4.   

    用了几年了,怎么可能不行.不过我的数据库是oracle.
    你的是什么??
      

  5.   

    access数据库 ,我就是想每天到最后都能查处当天的数据,应该怎么做
      

  6.   

    AllError(错误大全) :你的当然可以了.我也拿下来试过了.数据库是ORACLE.
    不过能不能介绍一下trunc的用法啊?
    我还是第一次遇见的说.
      

  7.   

    我用mysql数据库,取得当天的日期后,假设表里存日期的字段是(date),我这样取数据:
     var today='当天日期';
     
     String query="select * from TableName where date like '"+today+"%'";
    应该可以取出所有当天的数据了,我用过很多次了!
      

  8.   

    不好意思,没看到你是access数据库