Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

DDL Option For Materialized Views not Working

Patrick JolliffeMay 13 2025
SQL> create table t as select * from dual;
Table T created.

SQL> create materialized view mv as select * from t;
Materialized view MV created.

SQL> ddl mv
Multiple objects exist with the name mv. Please specify one of the following types: MATERIALIZED VIEW,TABLE

SQL> ddl mv materialized view
No file name specified for SAVE option.

SQL> ddl mv materialized_view
Object MATERIALIZED_VIEW mv not found

SQL> select dbms_metadata.get_ddl('MATERIALIZED_VIEW', 'MV') from dual;
DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW','MV')                                    
__________________________________________________________________________________
 CREATE MATERIALIZED VIEW "PDBADMIN"."MV" ("DUMMY")
 SEGMENT CREATION IMMEDIATE
 ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
NOCOMPRESS LOGGING
 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
 TABLESPACE "USERS" 
 BUILD IMMEDIATE
 USING INDEX 
 REFRESH FORCE ON DEMAND
 USING DEFAULT LOCAL ROLLBACK SEGMENT
 USING ENFORCED CONSTRAINTS DISABLE ON QUERY COMPUTATION DISABLE QUERY REWRITE
 AS select * from t    
SQL> 
Comments
Post Details
Added on May 13 2025
0 comments
62 views