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

    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')
  • 相关阅读:
    交互式输入编辑与历史命令补全
    string模板
    textwrap——文本包裹和填充模块解析
    python质量控制
    命令自动补全模块rlcomplete
    密码输入模块getpass
    交互模式启动配置文件
    pprint模块解析
    python基础知识--2字符串
    python基础知识--1注释
  • 原文地址:https://www.cnblogs.com/allen76615519/p/2352728.html
Copyright © 2011-2022 走看看