用BETWEEN函数可以解决问题。for example: BETWEEN(A,B)A B都是日期类型的变量

解决方案 »

  1.   

    select * from yourtable 
    where datafield between to_date('2003-01-01','yyyy-mm-dd') and to_date('2003-07-05','yyyy-mm-dd')
      

  2.   

    select * from table_name where sign(v_date-date1)*sign(date2-v_date)=1
      

  3.   

    select * from yourtable 
    where datafield between to_date(to_char(sysdate,'yyyy-mm')||'-01','yyyy-mm-dd') and to_date(to_char(sysdate,'yyyy-mm')||'10','yyyy-mm-dd')
      

  4.   

    select * from yourtable 
    where datafield >=to_date(to_char(sysdate,'yyyy-mm')||'-01','yyyy-mm-dd') and datafield <=to_date(to_char(sysdate,'yyyy-mm')||'-10','yyyy-mm-dd');
      

  5.   

    select * from yourtable 
    where to_char(datafield,'dd') between '01' and '10';