Oracle Synonym

本文解释了Oracle数据库中同义词的概念及其用途。同义词作为表或视图的别名,可以提供安全性并减少SQL语句的复杂度。文章还介绍了同义词如何为远程对象提供位置透明性,并允许底层对象重命名或移动而不需要修改应用程序。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

# 问题内容:请问oracle中的同义词是何意思?
# 原讨论链接:http://community.youkuaiyun.com/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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值