oracle数据库-date数据类型(时间)比较大小 ...
时间:2010-08-08 来源:jeff06143132
OCCUR_TIME为table表data数据类型的字段,以下为查询小于当前系统时间300秒的时刻后的记录
select * from table where OCCUR_TIME > (select sysdate - 300/(24*60*60) from dual)
或
select * from table where OCCUR_TIME > sysdate - 300/(24*60*60)
以下为查询2009-02-04 21:17:00后的记录
select * from table where OCCUR_TIME > to_date('2009-02-04 21:17:00','yyyy-mm-dd hh24:mi:ss')
相关阅读 更多 +