QuestionQ54

VerifiedBackup and Recovery Concepts

Review the commands:

SQL> ALTER SESSION SET RECYCLBIN = ON;  
Session altered.  
SQL> DROP TABLE emp; --(First EMP table)  
Total dropped.  
SQL> CREATE TABLE emp (id NUMBER CONSTRAINT emp_id_idx PRIMARY KEY, name VARCHAR2 (15), salary NUMBER(7,2) );  
Table created.  

You then run multiple INSERT statements to add rows to the EMP table, and drop the table again:

SQL> DROP TABLE emp; -- (Second EMP table)  
Table dropped.  
SQL> FLASHBACK TABLE emp TO BEFORE DROP;  

Which statement is true about the FLASHBACK command?

Explanation

When multiple dropped tables share an original name, FLASHBACK TABLE ... TO BEFORE DROP specified with that original name restores the most recently dropped version. Flashback Drop retrieves the table together with its dependent objects in the recycle bin, including its data and primary-key index.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!