ITPub博客

首页 > 数据库 > Oracle > 1Z0-053 V13.02 Q271

1Z0-053 V13.02 Q271

原创 Oracle 作者:cow977 时间:2016-06-16 19:58:00 0 删除 编辑
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

每次清除一个在回收站中的对象,清除的是最早在回收站中的对象。

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9018.htm#SQLRF55167

SQL> conn hr/hr
已连接。
SQL> create table cow977 ( id number(7));

表已创建。

SQL> insert into cow977 values (1234);

已创建 1 行。

SQL> drop table cow977;

表已删除。

SQL> create table cow977 ( a varchar2(10));

表已创建。

SQL> insert into cow977 values ('1234');

已创建 1 行。

SQL> drop table cow977;

表已删除。

SQL> select OBJECT_NAME,ORIGINAL_NAME, CREATETIME, DROPTIME from user_recyclebin;

OBJECT_NAME                    ORIGINAL_NAME                    CREATETIME          DROPTIME
------------------------------ -------------------------------- ------------------- -------------------
BIN$h/MVcV9OTdaAPbSxNTVioA==$0 COW977                           2016-06-16:19:55:00 2016-06-16:19:55:32
BIN$a/IbfeulSIutf/fwwwNp4A==$0 COW977                           2016-06-07:11:13:30 2016-06-07:11:18:05
BIN$6UANFu87S16yiJj+eRZsMA==$0 COW977                           2016-06-16:19:55:54 2016-06-16:19:56:11

SQL> purge table cow977;

表已清除。

SQL> select OBJECT_NAME,ORIGINAL_NAME, CREATETIME, DROPTIME from user_recyclebin;

OBJECT_NAME                    ORIGINAL_NAME                    CREATETIME          DROPTIME
------------------------------ -------------------------------- ------------------- -------------------
BIN$h/MVcV9OTdaAPbSxNTVioA==$0 COW977                           2016-06-16:19:55:00 2016-06-16:19:55:32
BIN$6UANFu87S16yiJj+eRZsMA==$0 COW977                           2016-06-16:19:55:54 2016-06-16:19:56:11

SQL> purge table cow977;

表已清除。

SQL> select OBJECT_NAME,ORIGINAL_NAME, CREATETIME, DROPTIME from user_recyclebin;

OBJECT_NAME                    ORIGINAL_NAME                    CREATETIME          DROPTIME
------------------------------ -------------------------------- ------------------- -------------------
BIN$6UANFu87S16yiJj+eRZsMA==$0 COW977                           2016-06-16:19:55:54 2016-06-16:19:56:11

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/81227/viewspace-2120297/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 1Z0-053 V13.02 Q250
下一篇: 1Z0-053 V13.02 Q616
请登录后发表评论 登录
全部评论

注册时间:2011-03-02

  • 博文量
    698
  • 访问量
    893883