OCP-1Z0-051 补充题库 第24题 SYNONYM同义词

来源:互联网 发布:hush puppies 知乎 编辑:程序博客网 时间:2024/06/03 02:44
一、原题
Examine the statement:
Create synonym emp for hr.employees;
What happens when you issue the statement?
A. An error is generated.
B. You will have two identical tables in the HR schema with different names.
C. You create a table called employees in the HR schema based on you EMP table.
D. You create an alternative name for the employees table in the HR schema in your own schema.

答案: D

二、题目翻译
看下面的语句:
Create synonym emp for hr.employees;
当你执行上面的语句时,会发生什么?
A.会报错。
B.在HR用户下,你将有两张完全相同的表,只不过他们的名字不同。
C.在HR用户下,基于EMP表,创建了一张叫employees的表。
D.在你自己的用户下,创建了一个HR用户下employees表的别名。

三、题目解析
Create synonym emp for hr.employees;
这句话,就是在自己的用户下,将hr用户下的employees表建一个同义词,叫emp,这样以后在自己的用户下,想要查询hr用户下的
employees表时,只要用emp这个名字即可,即select * from emp,这样显得更简洁,特别是表名很长的时候,取个短一些的别名,很方便。

0 0