Synonyms in Oracle:
Summary: In simple words, the tables of different users in Oracle are generally only available to their own users, and if you do not want to authorize other users to use them in an authorized way, then create the table with the table name in front of
Synonyms, which represents synonyms. In this way, a user-created table B can be used directly instead of a to grant B access to the table.
Transferred from: Http://zhidao.baidu.com/link?url=BiYEkVVBEGI9Br7Ltph1lr81f8TQEJgA_q-Omz_wlXSWUg28HN7I6nN1_Clw-Lhh1YD8jj1hdtEz9aJopcOHIK
Equivalent to alias (aliases), such as the User1.table1 in user2 to build a synonym table1
Create synonym table1 for user1.table1;
So when you check the user2 in the select * from table1 is equivalent to check select * from User1.table1;
Advantages to summarize it yourself.
For example:
The management of the user in Oracle is managed using permissions, that is, if we want to use the database, we have to have permission, but if someone else has granted us the permission, we can also operate on the database, but we have to type the name of the table owner before the name of the authorized table , so this is more troublesome, in this case, what should we do? Create a synonym for it! This allows us to use the table directly using synonyms.
Oracle synonym Synonyms