zoukankan      html  css  js  c++  java
  • oracle sql日期比较

     
    oracle sql日期比较:
    在今天之前:
    select*from up_date whereupdate< to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
    select*from up_date whereupdate<= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')

    在今天只后:
    select*from up_date whereupdate> to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
    select*from up_date whereupdate>= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')

    精确时间:
    select*from up_date whereupdate= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')

    在某段时间内:
    select*from up_date whereupdatebetween 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 whereupdate< to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') andupdate> to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
    select*from up_date whereupdate<= to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') andupdate>= to_date('2007-07-07 00:00:00','yyyy-mm-dd hh24:mi:ss')
  • 相关阅读:
    saltstack状态判断unless与onlyif
    saltstack搭建LAMP架构案例
    saltstack编写自定义模块
    saltstack数据系统Pillar
    saltstack数据系统Grains
    自动重连套路
    golang切片
    开源库evio源码学习
    计算机操作系统
    常用数据结构的时间复杂度
  • 原文地址:https://www.cnblogs.com/sopost/p/2275078.html
Copyright © 2011-2022 走看看