在 oracle 10G 中编写私有同义词的语法是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12384331/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
what is syntax for writing a private synonym in oracle 10G?
提问by user1466466
I am using following syntax for creating a private synonym of a table in oracle 10G:
我使用以下语法在 oracle 10G 中创建表的私有同义词:
create private synonym <synonym name>
for <schema name>.<table name>;
I am getting this error:
我收到此错误:
ERROR at line 1:
ORA-00905: missing keyword
Please guide me with correct syntax . I did research however i found syntax for public synonym only.
请用正确的语法指导我。我做了研究,但是我发现只有公共同义词的语法。
回答by Peter Lang
Just omit the private
keyword.
只需省略private
关键字。
From the documentation:
从文档:
CREATE [ OR REPLACE ] [ PUBLIC ] SYNONYM
[ schema. ]synonym
FOR [ schema. ]object [ @ dblink ] ;
PUBLIC
If you omit this clause, then the synonym is private and is accessible only within its schema. A private synonym name must be unique in its schema.
PUBLIC
如果省略此子句,则同义词是私有的,只能在其架构内访问。私有同义词名称在其架构中必须是唯一的。