现在的位置: 首页 > 综合 > 正文

Oracle Synonym

2013年03月04日 ⁄ 综合 ⁄ 共 1098字 ⁄ 字号 评论关闭
# 问题内容:请问oracle中的同义词是何意思?
# 原讨论链接:http://community.csdn.net/expert/topicview1.asp?id=1803303
# 所属论坛:基础和管理     审核组:Oracle
# 提问者:taozabc     解决者:hrb_qiuyb
# 感谢:hrb_qiuyb、yuanscar
# 关键字:
# 答案:

又有什么作用呢?
---------------------------------------------------------------

相当于alias(别名),比如把user1.table1在user2中建一个同义词table1
create synonym table1 for user1.table1;
这样当你在user2中查select * from table1时就相当于查select * from user1.table1;
优点自己总结吧。
---------------------------------------------------------------

A synonym is an alias for a schema object. Synonyms can provide a level of ecurity
by masking the name and owner of an object and by providing location transparency for remote objects of a distributed database. Also, they are convenient to use and reduce the complexity of SQL statements for database users.
Synonyms allow underlying objects to be renamed or moved, where only the synonym needs to be redefined and applications based on the synonym continue to function without modification.
You can create both public and private synonyms. A public synonym is owned by
the special user group named PUBLIC and is accessible to every user in a database.
A private synonym is contained in the schema of a specific user and available only
to the user and the user’s grantees.

抱歉!评论已关闭.