select 
    * 
from 
    table t 
where 
    to_char(t.日期字段,'yyyy-mm')=to_char(sysdate-3,'yyyy-mm)'--其余的可以举一反三.

解决方案 »

  1.   

    三天前的记录:
    select * from 表名 where (sysdate-日期字段-3)*1440 between -10 and 10三天后的记录:
    select * from 表名 where (sysdate-日期字段+3)*1440 between -10 and 10
      

  2.   

    select * from tb where dDate between sysdate+3-10/(60*24) and sysdate+3+10/(60*24)说明:
    sysdate     当前时间,取决于数据库机器的系统时间
    +3          3天后
    -10/(60*24) 10就是10分钟,60*24 就是一天24个小时,每个小时60分钟
      

  3.   

    where (sysdate-日期字段)*1440 between (3*1440-10) and (3*1440+10)
      

  4.   

    where 日期字段 between sysdate-3-10/(24*60) and sysdate-3+10/(24*60)