如何在 Oracle DB 中选择从昨天开始过去的行,其中 created_date
等字段是 timestamp(6)
?
我不想比较时间,只想比较日期。
最佳答案
如果您希望当前时间早一天:
select *
from table t
where created_date < sysdate - 1;
如果您想要今天之前的时间:
select *
from table t
where created_date <= trunc(sysdate);
关于sql - 选择日期小于今天的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23316922/