首页 > 数据库技术 > 详细

oracle sql日期比较

时间:2019-08-23 11:36:03      阅读:126      评论:0      收藏:0      [点我收藏+]

 

转:

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:ssand 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:ssand 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:ssand update >= to_date(2007-07-07 00:00:00,yyyy-mm-dd hh24:mi:ss)
posted on 2007-09-07 16:29 forker 阅读(79520) 评论(6)  编辑  收藏 所属分类: database

oracle sql日期比较

原文:https://www.cnblogs.com/libin6505/p/11398774.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!