zoukankan      html  css  js  c++  java
  • oracle 插入、合并、查询、聚合操作

    oracle从一个表查询数据插入到另一个表中

    insert into t_idd_event_history (detectorcode,detectorname,loopcode,subeventtype,description,occuretime,releasetime)
    select t.detectorid,t.detectorname,t.loopcode,t.subeventtype,t.description,t.updatetime,sysdate from t_iid_event_current t
    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')
  • 相关阅读:
    如何配置android的adb环境变量
    react中 如何异步展示后台接口的提示消息
    java doc 相关
    linux 停止多个 进程...
    maven 打包 war 包含 WEB-INF/lib 目录
    对 ArrayList 进行分页.
    docker 磁盘清理 相关
    vue 在 html 中自定义 tag
    docker 限制 容器内存 使用
    mysql 基本语句
  • 原文地址:https://www.cnblogs.com/jinweida/p/1222877.html
Copyright © 2011-2022 走看看