OCP-1Z0-新051-61题版本-1

本文详细解释了Oracle数据库中TRUNCATE TABLE语句的使用,指出其删除表中所有行但不释放存储空间的特点。TRUNCATE是DDL语句,不可回滚,且不触发触发器。它在删除表数据时速度快,但需注意与DELETE操作的区别。在执行前,需禁用所有引用外键。此外,TRUNCATE TABLE还有DROP ALL STORAGE选项用于释放空间。
摘要由CSDN通过智能技术生成

QUESTION NO: 1

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

Answer: A,D,F

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/general.htm#ADMIN11534

It is a DDL statement and cannot be rolled back  D正确,C错误

A TRUNCATE statement also specifies whether space currently allocated for the table is returned to the containing tablespace after truncation. A正确。B错误

You can truncate any table or cluster in your own schema. Any user who has the DROP ANY TABLE system privilege can truncate a table or cluster in any schema.  F正确。



sys@TESTDB>conn scott/tiger

Connected.

scott@TESTDB>select * from dept_new

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值