SQL查询检查到期日期是从今天3天?
答
3天远离你可以尝试这样的:
select * from tax where trunc(sysdate) - to_date(myDate, 'yyyy-mm-dd') = 3
答
取而代之的应用演算(并且使索引无法使用),您最好一次执行此操作:
select * from tax
where myDate >= trunc(sysdate) + 3
and myDate < trunc(sysdate) + 4
'Extract'不起作用。 – dnoeth
@dnoeth: - 删除了! –