Snippet Name: Materialized View
Description: A materialized view is a database object that contains the results of a query. The FROM clause of the query can name tables, views, and other materialized views.
Also see: » VIEW
» Create View
Comment: Another name for Materialized View is Snapshot.
Language:
Highlight Mode: PLSQL
Last Modified: March 07th, 2009
|
Syntax -
CREATE MATERIALIZED VIEW <schema.name>
PCTFREE <integer>
PCTUSED <integer>
TABLESPACE <tablespace_name>
BUILD IMMEDIATE
REFRESH <FAST | FORCE> ON <COMMIT | DEMAND>
<USING INDEX | USING NO INDEX>
INITRANS <integer>
STORAGE CLAUSE
AS (<SQL statement>);
CREATE materialized VIEW schema.test_mv
TABLESPACE data1
BUILD IMMEDIATE
REFRESH FAST ON COMMIT AS
SELECT * FROM all_tables;
|