oracle date等类型是带时间部分的,所以你这个2011-07-05 只是相当于2011-07-05 00:00:00这个时刻,按你的写法大于这个时刻的是不会删除的。如果你确实要删除2011-07-05的建议你用以下写法: delete from jf_syslog where inputtime >=date'2011-07-01' and nputtime<date'2011-07-06'
如果不担心2011-07-06 00:00:00的也可以 delete from jf_syslog where inputtime between date'2011-07-01' and date'2011-07-06'
如果效率可以接受,可以先转换成字符串 delete from jf_syslog where to_char(inputtime,'yyyymmdd') between '20110701' and '20110705'