zoukankan      html  css  js  c++  java
  • oracle回闪操作

    在9i上执行的操作

    查询test表中记录
    select * from test;
    删除test表中记录
    delete from test;
    获得过去的会话
    exec dbms_flashback.disable;
    查询出3分钟前这个test表的情况
    select * from test as of timestamp(systimestamp - interval '3' minute );
    将查出的记录插入到误删除数据的表中
    insert into test select * from test as of timestamp(systimestamp - interval '30' minute );


    两种方法:
    1、使用dbms_flshback
    闪回:DBMS_FLASHBACK.enable_at_time(to_timestamp('2006-5-24 8:26:0', 'yyyy-mm-dd hh24:mi:ss'))
    _changexec dbms_flashback.enable_at_systeme_number(4143031890000);--change number
    取消闪回:exec dbms_flashback.disable
    2、语句级
    select * from dept as of scn 4143031890000);--change number
    select * from dept as of timestamp(to_timestamp('2006-5-24 8:26:0', 'yyyy-mm-dd hh24:mi:ss'));

    在10G上执行的操作
    例:执行将test表闪回到2005年5月7日下午3点。
    SQL>flashback table test to timestamp to_timestamp('2005-05-07 15:00:00','yyyy-mm-dd hh24:mi:ss');


    修改数据库中某些字段存在的空格
    update laagent set name=replace(name,' ','') where agentcode='116000001'

  • 相关阅读:
    jquery两个滚动条样式
    js双层动画幻灯
    漂浮QQ
    js物理弹性窗口
    js抽奖跑马灯程序
    经典算法
    判断手机浏览器终端设备
    javascript判断手机旋转横屏竖屏
    【转】处理百万级以上的数据提高查询速度的方法
    Linux -- Centos 下配置LNAMP 服务器环境
  • 原文地址:https://www.cnblogs.com/luofuxian/p/2377440.html
Copyright © 2011-2022 走看看