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