具有嵌套表的物化视图

时间:2013-12-11 23:06:30

标签: sql oracle oracle11g

我有以下类型:

create or replace type varchar2_arr as table of varchar2(300)

我尝试创建物化视图:

create table a (id varchar2(10), data varchar2(200), constraint pk_a primary key(id));
create table b (id varchar2(10), data varchar2(200), constraint pk_b primary key(id));

create materialized view log on a with rowid;
create materialized view log on b with rowid;

create materialized view mnest_ab_mv
refresh fast on commit
as
select a.rowid a_rowid, b.rowid b_rowid, varchar2_arr(a.data), b.data
from a, b
where a.id = b.id (+)

oracle给了我以下错误:

ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view

使用嵌套表创建实体化视图需要做什么?

1 个答案:

答案 0 :(得分:1)

您是否尝试过运行DBMS_MVIEW.EXPLAIN_MVIEW程序,其输出可能有所帮助。

由于

Vishad