Recovering Drop Tables
Recovering Drop Tables.
Last updated:
Warning: Review and test in a non-production environment before running.
-- Based on: "Oracle Flash Back Query Explained with Example", oracle-dba-online.com – https://www.oracle-dba-online.com/flash_back_features.htm
-----------------------------------------------------------------------------------------------------------------------
-- Recovering Drop Tables (Undo Drop Table)
-----------------------------------------------------------------------------------------------------------------------
drop table emp;
-- Now for user it appears that table is dropped but it is actually renamed and placed in Recycle Bin.
-- To recover this dropped table a user can type the command
Flashback table emp to before drop;
-- You can also restore the dropped table by giving it a different name like this
Flashback table emp to before drop rename to emp2;