Oracle OCP 1Z0-053 Q271(Purge Table)

271.Examine the output of the query that you executed to list the objects in the recycle bin:

You verified that no table named SALES_TAB exists in the schema. Then you executed the following
command to purge the objects in the recycle bin:
SQL> PURGE TABLE sales_tab;
What would be the outcome of this command?
A. All three tables in the recycle bin are purged
B. Only the table with the oldest DROPSCN is purged
C. The command returns an error because multiple entries with the same name exist in the recycle bin
D. Only the table with the latest DROPSCN is purged
Answer: B

验证:从以下实验可以看出,purge table将最早的版本从回收站中清除了

SQL> conn scott/tiger
Connected.
SQL> create table t1 as select rownum rn from dual connect by rownum <= 10;


Table created.


SQL> drop table t1;


Table dropped.


SQL> create table t1 as select rownum rn from dual connect by rownum <= 100;


Table created.


SQL> drop table t1;


Table dropped.


SQL> select original_name,droptime,dropscn from user_recyclebin;


ORIGINAL_NAME                    DROPTIME               DROPSCN
-------------------------------- ------------------- ----------
T1                               2016-03-24:20:02:57    1208420
T1                               2016-03-24:20:02:32    1208378


SQL> purge table t1;


Table purged.


SQL> select original_name,droptime,dropscn from user_recyclebin;


ORIGINAL_NAME                    DROPTIME               DROPSCN
-------------------------------- ------------------- ----------
T1                               2016-03-24:20:02:57    1208420


SQL> flashback table t1 to before drop;


Flashback complete.


SQL> select count(*) from t1;


  COUNT(*)
----------
       100

请使用浏览器的分享功能分享到微信等