问题
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