数保软件服务热线
新闻中心

您当前的位置:主页 > 新闻中心 > 技术交流 > 技术交流

oracle 日期比较SQL

打印 打印 来源 数保计算机 点击:
编辑:数保计算机 时间:2014-05-10 23:59

oracle sql日期比较:
在今天之前: select * from up_date where update < to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update <= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
在今天只后: select * from up_date where update > to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update >= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
精确时间: select * from up_date where update = to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
在某段时间内: select * from up_date where update between to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update < to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and update > to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
select * from up_date where update <= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and update >= to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss')




Copyright © 2015-2022 长沙数保信息科技有限公司 ┇ 湘ICP备08103633号 湘公网安备 43011102000746号

地址:长沙市岳麓区润花园D1-903 公司邮箱:dpisi@163.com
7*24小时技术支持服务热线:0731-85057097/13607439515 QQ: 400528 或 156462627

湘公网安备 43011102000746号