Oracle 时间查询
to_date('2022-11-11 11:11:11','yyyy-mm-dd hh24:mi:ss')
to_date('2022-11-11','yyyy-mm-dd')
//时间加一分钟
select * from 表名
where to_date('2021-10-12 9:56:01','yyyy-mm-dd hh24:mi:ss')
between CreateTime and CreateTime+1/(24*60);
字段加一秒
加一天
select to_date('2022-11-11 11:11:11','yyyy-mm-dd hh24:mi:ss')+1 next_day from dual;
加一小时
select to_date('2022-11-11 11:11:11','yyyy-mm-dd hh24:mi:ss')+1/24 next_hour from dual;
加一分钟
select to_date('2022-11-11 11:11:11','yyyy-mm-dd hh24:mi:ss')+1/(24*60) next_minute from dual;
加一秒
select to_date('2022-11-11 11:11:11','yyyy-mm-dd hh24:mi:ss')+1/(24*60*60) next_second from dual;