select * from table where to_char(ddate-1,'yyyy-mm-dd')='2004-11-11'

解决方案 »

  1.   

    select * from table where ddate=to_date('2004-11-11','yyyy-mm-dd')-1
      

  2.   

    select * from table where ddate=to_date('2004-11-11','yyyy-mm-dd')-1
      

  3.   

    select * from table where to_char(ddate+1,'yyyy-mm-dd')='2004-11-11'
      

  4.   

    GerryYang(轻尘)兄,你好象写成后一天的了吧,呵呵
      

  5.   

    select * from table where ddate=to_date('2004-11-11','yyyy-mm-dd')-1
      

  6.   

    很简单:
    select * from table where to_char(ddate,'yyyy-mm-dd')='2004-11-10';
     
    呵呵。select * from table where to_char(ddate-1,'yyyy-mm-dd')='2004-11-11';
    select * from table where to_char(ddate,'yyyymmdd')='20041111'-1;
    select * from table where ddate+1=to_date('2004-11-11','yyyy-mm-dd');
    .......问题是楼主的'2004-11-11'是个变值还是定值??
      

  7.   

    select * from table where date_col between trunc(sysdate-1) and trunc(sysdate);