Home » SQL & PL/SQL » SQL & PL/SQL » Materialized View with for update
Materialized View with for update [message #434608] Wed, 09 December 2009 23:06 Go to next message
vikram1780
Messages: 222
Registered: January 2007
Location: Bangalore
Senior Member
Hi All,

When I am trying to create a materialized view on table with for update option I am able to create successfully.

The same when I am trying to create with view. I am encountered with below error.

SQL> create table tab1 as select * from user_objects where rownum<10;
 
Table created
 
SQL> alter table tab1 add primary key (object_id);
 
Table altered
 
SQL> create materialized view mv1 for update as select * from tab1;
 
Materialized view created
 
SQL> create or replace view v1 as select * from tab1;
 
View created
 
SQL> create materialized view mv2 for update as select * from v1;
 
create materialized view mv2 for update as select * from v1
 
ORA-12013: updatable materialized views must be simple enough to do fast refresh
 



Thanks in Advance
Re: Materialized View with for update [message #434609 is a reply to message #434608] Wed, 09 December 2009 23:09 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
12013, 00000, "updatable materialized views must be simple enough to do fast refresh"
// *Cause:  The updatable materialized view query contained a join, subquery,
//          union, connect by, order by, or group by caluse.
// *Action: Make the materialized view simpler. If a join is really needed,
//          make multiple simple materialized views then put a view on top of
//          them.
Re: Materialized View with for update [message #434615 is a reply to message #434609] Wed, 09 December 2009 23:34 Go to previous messageGo to next message
vikram1780
Messages: 222
Registered: January 2007
Location: Bangalore
Senior Member
Thanks SWAN
Re: Materialized View with for update [message #434617 is a reply to message #434615] Wed, 09 December 2009 23:38 Go to previous message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
Please realize that such information is available via GOOGLE & you are supposed to actually SEARCH for solution before posting!
Previous Topic: where clause and execution plan
Next Topic: Problem with Long column
Goto Forum:
  


Current Time: Sun Dec 04 10:31:48 CST 2016

Total time taken to generate the page: 0.12978 seconds