I have an existing materialized view in Oracle.
But I want to add more columns to it. I saw that it is not possible to execute
CREATE OR REPLACE
to the materialized view so how can I do that ?
Thanks!
I have an existing materialized view in Oracle.
But I want to add more columns to it. I saw that it is not possible to execute
CREATE OR REPLACE
to the materialized view so how can I do that ?
Thanks!
select * from dba_objects where status='INVALID';
grant create materialized view to <schema>;
grant create table to <schema>;
drop MATERIALIZED VIEW <schema>.<mvname>;
CREATE MATERIALIZED VIEW <schema>.<mvname>
(...)
AS SELECT (...);
select * from <schema>.<mvname>;
revoke create materialized view from <schema>;
revoke create table from <schema>;
select * from dba_objects where status='INVALID';
Add the columns to the base table and after that run a refresh in the MV.