Other Oracle Data Objects-Synonyms

Source: Internet
Author: User
1. Introduce How to Use synonyms to access the same object: (1) convenient access to objects of other users (2) shorten the length of object names; 2. create synonyms SQLgt; create

1. Introduce How to Use synonyms to access the same object: (1) convenient access to objects of other users (2) shorten the length of object names 2. create synonyms SQLgt; create

1. Introduction

Use synonyms to access the same object:

(1) convenient access to other user objects

(2) Shorten the Object Name Length

2. Create a synonym

SQL> create synonym syn_emp for scott. emp;

You have created a synonym.

3. Delete Synonyms

SQL> drop synonym syn_emp;

The synonym has been deleted.

Note: After creation, it can be accessed in a sqlplus window, and cannot be accessed after opening a sqlplus window. Therefore, public should be added:

SQL> create public synonym syn_emp for scott. emp;

Therefore, when you delete a file, the file is:

SQL> drop public synonym syn_emp;

If you do not know the password when logging on, you can use the following statement to enter, which is the highest administrator:

Sqlplus sys/pass as sysdba

For more information about Oracle, see the Oracle topic page? Tid = 12

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.