Skip Headers
Oracle® TimesTen In-Memory Database SQL Reference
Release 11.2.1

Part Number E13070-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

CREATE MATERIALIZED VIEW LOG

The CREATE MATERIALIZED VIEW LOG statement creates a log in which changes to a table are recorded. The log is required for an asynchronous materialized view that is refreshed incrementally. The log must be created before the materialized view is created. The log is a table in the user's schema called MVLOG$_ID, where ID is a system-generated ID.

Required privileges

SELECT on the detail table and

CREATE TABLE or CREATE ANY TABLE (if not owner)

SQL syntax

CREATE MATERIALIZED VIEW LOG ON tableName
  [WITH [PRIMARY KEY][,ROWID]|[ROWID][,PRIMARY KEY] [(columnName[,...])]]

Parameters

Parameter Description
tableName Name of the detail table for the materialized view
[(columnName[,...]) List of columns for which changes will be recorded in the log.

Description

Examples

Create a materialized view log on the employees table. Include employee_id (the primary key) and email in the log.

CREATE MATERIALIZED VIEW LOG ON employees WITH PRIMARY KEY (email);

See also


CREATE MATERIALIZED VIEW
DROP MATERIALIZED VIEW LOG