大家好,我是架构君,一个会写代码吟诗的架构师。今天说一说oracle sql 时间比较_oracle todate格式,希望能够帮助大家进步!!!
select *
from BCS\_EXCEPTION\_LOG t
where 1=1
<if test="topic != null and topic !=''">
and t.f\_topic like concat(concat('%',#{topic}),'%')
</if>
<if test="receiveStartTime != null and receiveStartTime !=''">
and t.f\_receivedate >= to\_date(#{receiveStartTime},'yyyy-mm-dd hh24:mi:ss')
</if>
<if test="receiveEndTime != null and receiveEndTime !=''">
and t.f\_receivedate <= to\_date(#{receiveEndTime},'yyyy-mm-dd hh24:mi:ss')
</if>
order by t.f\_receivedate desc
参数格式:2019-05-19 14:02:38(String)