是不是:
where a > trunc(sysdate) - 2

解决方案 »

  1.   

    select * from tb where intime>sysdate-2;
      

  2.   

    噢,不好意思,那是我没说清楚,我的意思是这样的:
    选出starttime和totime两个时间,是付给这两个变量的,然后查询数据表里的字段ptime再这两个值之间的数据。
      

  3.   

    差不多啊
    select * from tbname where ptime >=starttime and ptime<=totime;
      

  4.   

    select * from tb where ptime > starttime and ptime < totime;
    如果你的starttime和totime两个时间是varchar2的,就用to_date转换一下