Use of FLASHBACK in Oracle

前端 未结 1 520
别那么骄傲
别那么骄傲 2020-12-07 05:06

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

相关标签:
1条回答
  • 2020-12-07 05:27

    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.

    0 讨论(0)
提交回复
热议问题