本文介绍了在Oracle中使用FLASHBACK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经搜索了闪回命令.在写入的地方,我们可以回滚截断操作,在写入的地方,我们不能回滚.Oracle中的FLASHBACK命令可以用来回滚截断表操作吗?
I have searched for the flashback command. Somewhere it is written we can rollback the truncate operation, and somewhere it is written we can't rollback.Can the FLASHBACK command in Oracle used to rollback the truncate table operation?
推荐答案
您需要启用 Flashback Data Archive
.然后,可以使用以下语句来反转截断:
insert into <truncated_table>
select * from <truncated_table> as of timestamp <some time>;
感谢@ Jon Heller 添加了有关新功能的有用信息:
Thanks to @Jon Heller for adding this useful information about the new feature:
这需要版本11.2
或更高版本,该版本引入了对 DDL语句,例如截断.
This requires version 11.2
or higher, which introduced support for DDL statements such as truncate.
这篇关于在Oracle中使用FLASHBACK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!