Oracle数据库,查询语句时间条件书写格式? oracle连接数据库命令
更新时间:2022-02-11 10:52:44 • 作者:SPENCER •阅读 1403
oracle sql语句时间条件
where time between '08:00' and '18:00'
以上是大概意思,具体时间的表示方法要根据数据库时间字段的类型和格式来。
在oracle中,使用时间做条件查询记录,怎么写语句
select * from abc
where zxc>=to_date('2012-02-29 15:00:00','yyyy-mm-dd hh24:mi:ss')
and zxc<=to_date('2012-03-01 15:00:00' ,'yyyy-mm-dd hh24:mi:ss');
前提是:zxc是时间类型的。
oracle时间条件查询
select * from a where rq between to_date('20100901','yyyymmdd') and to_date('20100903 24:00:00','yyyymmdd hh24:min:ss');因为它默认的是12小时制的,所以只有到12点的,你转换成24小时制的试试看
oralce sql 查日期语句怎么写
select * from hr_info where to_char(comdate,'yyyy-mm-dd') between '2009-01-01' and '2010-01-01'