您的位置:首页 > 其它

OCP-1Z0-051 补充题库 第1题 TRUNCATE命令的使用

2014-05-26 22:43 295 查看
一、原题

Evaluate the SQL statement:
TRUNCATE TABLE DEPT;
Which three are true about the SQL statement? (Choose three.)
A. It releases the storage space used by the table.
B. It does not release the storage space used by the table.

C. You can roll back the deletion of rows after the statement executes.
D. You can NOT roll back the deletion of rows after the statement executes.
E. An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will

display an error.
F. You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate

the DEPT table

答案: A,D,F

二、题目翻译

评估下面的sql语句:

TRUNCATE TABLE DEPT;

关于上面的sql语句,哪三个描述是正确的?(选择三项)

A.会释放表使用的存储空间。

B.不会释放表使用的存储空间。

C.执行完成后,可以回滚删除的数据。

D.执行完成后,不能回滚删除的数据。

E.执行完成后,使用DESCRIBE DEPT命令显示表结构会报错。

F. 执行这个命令,需要是这张表的拥有者,或者有DELETE ANY TABLE权限。

三、题目解析

TRUNCATE命令,是删除表中所有的数据,并且释放表空间,因为在删除的过程中不会产生undo信息,所以,不能回滚。

执行这个命令,需要有相关的权限,是自己建的表,或是有DELETE ANY TABLE权限,才可以删。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息