oracle时间转换、比较
有时候用到oracle的sysdate与数据库中的时间字段比较,所以需要用到to_char和to_date,
select h.resourceid, to_char(to_date(h.close_time,'yyyy-MM-dd hh34:mi:ss'),'yyyy-MM-dd'),to_char(sysdate,'yyyy-MM-dd') from IMS_NW.alert_info_history h
where to_char(to_date(h.close_time,'yyyy-MM-dd hh34:mi:ss'),'yyyy-MM-dd') = to_char(sysdate,'yyyy-MM-dd');