zoukankan      html  css  js  c++  java
  • OCP-1Z0-051-V9.02-51题

    51. Which statement is true regarding synonyms?
    A. Synonyms can be created only   for a table.  不只是表,schema object
    B. Synonyms are used to reference only those tables that are owned by another user.
    C. A public synonym and a private synonym can exist with the same name for the same table. 共有和私有可以共同存在
    D. The DROP SYNONYM statement removes the synonym, and the table on which the synonym has
    been created becomes invalid.
    Answer: C
    答案解析:
    A错误,不只是表,是数据库所有的对象,如表、视图、序列、过程等。
    B错误,由数据库管理员创建的公共的同义词,可以所有的用户都可以访问,而由用户自己创建的同义词,只能自己访问。
    C正确,共有同义词和私有同义词的名字在一张表中可以相同。
    实验验证:
    sys@TEST0924> create public synonym semp for scott.emp;

    Synonym created.

    sys@TEST0924> conn scott/tiger
    Connected.
    scott@TEST0924> create synonym semp for emp;-------------必须有创建同义词权限,否则报错
    create synonym semp for emp
    *
    ERROR at line 1:
    ORA-01031: insufficient privileges


    scott@TEST0924> conn /as sysdba
    Connected.
    sys@TEST0924> grant CREATE synonym to scott;-------------赋予创建同义词权限

    Grant succeeded.

    sys@TEST0924> conn scott/tiger
    Connected.
    scott@TEST0924> create synonym semp for emp;------------创建一个和共有同义词的一样名称的同义词,执行成功。

    Synonym created.
    D错误,删除了同义词,但是表不会被变为无效的。

  • 相关阅读:
    013开发板系统安装准备
    012开发板串口连接
    011OK6410开发板介绍
    010GCC程序编译
    009Linux密码故障排除
    vue 中的solt的用法
    vue solt的应用场景
    Typescript 用接口模拟ajax请求
    Typescript方法重载实现系列二
    Typescript中方法重载的实现
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13316928.html
Copyright © 2011-2022 走看看