在 Oracle 上创建可编辑视图
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41197822/
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
Create editionable view on Oracle
提问by SocketM
I am trying to create an ORACLE EDITIONABLE VIEW but I am getting the error:
我正在尝试创建一个 ORACLE EDITIONABLE VIEW,但出现错误:
SQL Error: ORA-00922: missing or invalid option 00922. 00000 - "missing or invalid option"
SQL 错误:ORA-00922:选项 00922 缺失或无效。00000 -“选项缺失或无效”
CREATE OR REPLACE FORCE EDITIONABLE VIEW "SCHEMA"."TABLE" ....
In https://docs.oracle.com/database/121/SQLRF/statements_8004.htm#SQLRF01504is mentioned how u can create this kind of view.
在https://docs.oracle.com/database/121/SQLRF/statements_8004.htm#SQLRF01504中提到了如何创建这种视图。
If I remove EDITIONABLE the view is created without a problem.
如果我删除 EDITIONABLE,则创建的视图没有问题。
Some advice will be welcomed :-)
欢迎提供一些建议:-)
采纳答案by Leo
Wrong syntax prbly
语法错误
CREATE EDITIONING VIEW
You need oracle 11gR2 or higher
您需要 oracle 11gR2 或更高版本
Also you need to enable Editions for user: (from here)
您还需要为用户启用版本:(从这里)
Enabling editions for a user is done using the ALTER USER command. This is not reversible. The result of this command can be seen by querying the EDITIONS_ENABLED column of the DBA_USERS view.
使用 ALTER USER 命令为用户启用版本。这是不可逆的。通过查询 DBA_USERS 视图的 EDITIONS_ENABLED 列可以看到该命令的结果。
CONN / AS SYSDBA
ALTER USER edition_test ENABLE EDITIONS;