where column between .. and ..

解决方案 »

  1.   

    select * from tbname where dtcol >= to_date('2002-01-01 00:00:00') and dtcol < to_date('2003-01-01 00:00:00')
      

  2.   

    select * from table_name
    where to_char(colnum,'yyyy')='2002';
      

  3.   

    select * from xxx where a >= to_date('2002'||'0101','yyyymmdd') and a < add_months(to_date('2002'||'0101','yyyy'),12);
      

  4.   

    select * from to_char(coldate,'yyyy')='yyyy';
      

  5.   

    sorryadd_months(to_date('2002'||'0101','yyyymmdd'),12);
      

  6.   

    where column between trunc(to_date('01-01-2002','mm/dd/yyyy))and trunc(to_date('01-01-2003','mm/dd/yyyy))