---
title: "数据闪回"
author: "lcb530"
date: "2010-06-18T15:39:09Z"
tags: ["Windows"]
categories: ["数据库"]
slug: "untitled"
draft: false
lastmod: "2010-06-18T15:39:09Z"
id: 693994
url: "https://lcb530.iteye.com/blog/693994"
---

闪回即还原，Oracle9i以上的版本可以将数据还原到指定的日期以前，当然这里指的是以前的数据是没有被覆盖的，就像Windows系统，删除的文件只有没被覆盖就可以找回一样！

 

//将2010-3-19 15:41以前的数据，保存到新表中

create table tempbak as

(select * from 表名 as of timestamp  to\_timestamp('2010-3-19 15:41','yyyy-mm-dd hh24:mi'))

 

 

//将将新表中的数据插回，插回前请先清理该表的数据  
insert into 表名 select * from tempbak