且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Oracle中使用FLASHBACK

更新时间:2023-11-29 13:55:34

您需要启用 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.