sleect * from (select rownum rn,* from table order by date desc) where rn=1

解决方案 »

  1.   

    Where trunc(时间字段)=trunc(to_date(sysdate,'yyyy-mm-dd'))是查询当天的,其它天的类似
      

  2.   

    select * from tab where datefield > sysdate - 1 ,是指从昨天这个时候到现在的记录,sysdate - 0.5是前半天的记录,如果只是模糊查询用这个比较快
      

  3.   

    select * from table order by date descselect * from table where date>sysdate-1
      

  4.   

    select * from table T1 Where trunc(T1.Datacol)=trunc(sysdate)