当前位置: 代码迷 >> Oracle开发 >> 一个建立在View下的物化View 可以建立 on commit机制吗
  详细解决方案

一个建立在View下的物化View 可以建立 on commit机制吗

热度:56   发布时间:2016-04-24 07:09:04.0
一个建立在View上的物化View 可以建立 on commit机制吗
一个建立在View上的物化View 可以建立 on commit机制吗?
create materialized view mv_1
as
select * from v_1

------解决方案--------------------
sys@ORCL> create view emrep as select * from hr.employees;

View created.

sys@ORCL> create materialized view mv_emrep refresh force on commit as select * from emrep;
create materialized view mv_emrep refresh force on commit as select * from emrep
                                                                           *
ERROR at line 1:
ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view


sys@ORCL> !oerr ora 12054
12054, 00000, "cannot set the ON COMMIT refresh attribute for the materialized view"
// *Cause:  The materialized view did not satisfy conditions for refresh at
//          commit time.
// *Action: Specify only valid options.
  相关解决方案