OCP-1Z0-051 补充题库 第42题 DROP TABLE命令的影响

news/2024/7/7 20:50:16 标签: OCP-1Z0-051, 11g, DROP TABLE, 索引, 事务
一、原题
You issue the following command to drop the PRODUCTS table:
SQL>DROP TABLE products;
What is the implication of this command? (Choose all that apply.)
A. All data in the table are deleted but the table structure will remain
B. All data along with the table structure is deleted
C. All views and synonyms will remain but they are invalidated

D. The pending transaction in the session is committed
E. All indexes on the table will remain but they are invalidated

答案: B,C,D

二、题目翻译
PRODUCTS表执行drop table products;命令,
这个命令执行后会发生什么结果?
A.所有的数据都被删除,但表结构会被保留。
B.所有的数据和表结构都被删除了。
C.所有的和这张表相关的视图和同义词会被保留,但是已经失效了。
D.在这个会话中,没提交的事务会被提交。
E.这张表相关的索引会被保留,但是已经失效了。

三、题目解析
1.drop命令是删除表,不光是数据,表结构也删除了。
2.基于这张表的索引会被删除,但是视图和同义词会被保留,详细可查看联机文档,关于drop table 的说明:
        http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9003.htm#SQLRF01806
        If the table is a base table for a view, a container or master table of a materialized view, or if it is referenced in a stored procedure, function, or package, then the database invalidates these dependent objects but does not drop them. You cannot use these objects unless you re-create the table or drop and re-create the objects so that they no longer depend on the table.

        All table indexes and domain indexes are dropped, as well as any triggers defined on the table, regardless of who created them or whose schema contains them. If table is partitioned, then any corresponding local index partitions are also dropped.

3.drop table 是DDL语句,DDL语句会提交没有提交的事务



http://www.niftyadmin.cn/n/1119911.html

相关文章

PHP画图基础

Title: PHP画图基础 Author: MoreWindows Blog: http://blog.csdn.net/MoreWindows KeyWord: PHP绘图 画点、线、弧线 绘制和填充区域 图片特效 彩色圣诞节大雪花图 本篇对PHP常用的绘图函数进行总结。内容有建立图像,为图像分配颜色,画点&am…

Koa2 之文件上传下载

前言 上传下载在 web 应用中还是比较常见的,无论是图片还是其他文件等。在 Koa 中,有很多中间件可以帮助我们快速的实现功能。 文件上传 在前端中上传文件,我们都是通过表单来上传,而上传的文件,在服务器端并不能像普通…

我的runtime理解和用法

1.什么是运行时机制 1)运行时机制是比较低层的纯c语言的API文档,属于c语言库,包含了许多底层的c语言API 2)oc中的对象,方法在运行时才知道它时什么类型的,这个类型是动态生成的像KVO的底层实现就是运用了ru…

.NET Core 2.0 开源Office组件 NPOI

前言 去年 12 月,我移植了大家所熟知 NPOI 到 .NET Core 版本,这里是当时发的博客,当时得到了很多同学的支持,社区反应也很好,在这里非常感谢当时推荐的朋友们。 去年的那个版本是针对于 .NET Core 1.0 的,…

OCP-1Z0-051 补充题库 第43题 子查询

一、原题 Exhibit contains the structure of PRODUCTS table: Evaluate the following query: What would be the outcome of executing the above SQL statement? A. It produces an error B. It shows the names of products whose list price is the second h…

解决“此电脑上没有安装True Speech声音×××”的方法

解决“此电脑上没有安装True Speech声音”的方法很多朋友也许都和我一样同学学习别人的视频来了解和掌握从书本上没有学到的东西。并且很多视频都是屏幕录像专家录制的。当播放时出现“此电脑上没有True Speech声音,无法播放此文件中的声音,可能是你的操…

禅道 bug指向为数字问题解决过程

browse.html.php <td <?php if($bug->assignedTo $this->app->user->account) echo class"red";?>><?php echo zget($users, $bug->assignedTo, $bug->assignedTo);?></td>转载于:https://www.cnblogs.com/cb168/p/5…

列举你能想到的UNIX信号,并说明信号用途

信号是一种软中断&#xff0c;是一种处理异步事件的方法。一般来说&#xff0c;操作系统都支持许多信号。尤其是UNIX&#xff0c;比较重要应用程序一般都会处理信号。 UNIX定义了许多信号&#xff0c;比如SIGINT表示中断字符信号&#xff0c;也就是CtrlC的信号&#xff0c;SIG…