Oracle Series: (23) synonyms

Source: Internet
Author: User



What is the synonym "synonym"?

(1) For some long names of objects (table, view, index, sequence, ...) ) do the subtraction, Replace with aliases


The role of synonyms

(1) Shorten the length of the object name

(2) Easy access to other users ' objects


Create synonyms that correspond to the Salgrade table,

Create synonym synonyms for table name/view/other objects
Create synonym E for salgrade;create synonym ev5 for emp_view_5;


650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/87/19/wKioL1fULbXhPFLGAAA80fgF2SU136.jpg "title=" 018. JPG "alt=" wkiol1fulbxhpflgaaa80fgf2su136.jpg "/>

Grant Scott Normal user create synonym permissions as sys

Grant create synonym to Scott;


Revoke create synonym permissions from the Scott normal user as Sys

Revoke create synonym from Scott;


Using synonyms to manipulate salgrade tables

select * from S;

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/87/1B/wKiom1fULu2ydYwqAACPEHhOT8w609.jpg "title=" 019. JPG "alt=" wkiom1fulu2ydywqaacpehhot8w609.jpg "/>


Delete synonyms

drop synonym ev5;

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/87/1B/wKiom1fUL8DiOyiHAABeaRe5inY946.jpg "Title=" 020. JPG "alt=" wkiom1ful8dioyihaabeare5iny946.jpg "/>


Does deleting a synonym affect the base table?

Does not affect the base table


Does deleting a base table affect synonyms?

Will affect synonyms

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/87/19/wKioL1fUMLPRBxvvAADCMQ6lsgg534.jpg "title=" 021. JPG "alt=" wkiol1fumlprbxvvaadcmq6lsgg534.jpg "/>




Oracle Series: (23) synonyms

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.