怎么向Oracle物化视图中插入数据

create materialized view mv_t refresh fast with rowid enable query rewrite
as
(select supplier.nationkey, supplier.phone, supplier.name,customer.rowid c_num,supplier.rowids_num from supplier,customer
wheresupplier.nationkey=customer.nationkey);
创建视图成功后,执行insert into mv_t values操作,提示此数据的数据操纵操作非法。
恳请请大神帮忙解决~~~

第1个回答  2014-04-21
创建物化视图是默认是不可更新的,要创建可以更新的物化视图必须加上for update 关键字。
create materialized view mv_t refresh fast with rowid for update as select * from t;追问

这样的方式创建,提示错误:ORA-12013: 可更新实体化视图必须足够简单, 以进行快速刷新。你明白为什么么?

相似回答