Use of FLASHBACK in Oracle

随声附和 提交于 2019-12-28 07:06:07

问题


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?


回答1:


You need to have Flashback Data Archive enabled. Then the truncate could be reversed with a statement like this:

insert into <truncated_table> 
   select * from <truncated_table> as of timestamp <some time>;

Thanks to @Jon Heller for adding this useful information about the new feature:

This requires version 11.2 or higher, which introduced support for DDL statements such as truncate.



来源:https://stackoverflow.com/questions/25950145/use-of-flashback-in-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!