Edit

ALTER MATERIALIZED VIEW

Description

Alters the name or refresh strategy of a materialized view.

Sytax

ALTER MATERIALIZED VIEW [database.]mv_name {REFRESH ASYNC new_refresh_scheme_desc | RENAME [database.]new_mv_name}

Parameters in brackets [] is optional.

Parameters

ParameterRequiredDescription
mv_nameyesThe name of the materialized view to alter.
new_refresh_scheme_descnoNew async refresh strategy, see SQL Reference - CREATE MATERIALIZED VIEW - Parameters for details.
new_mv_namenoNew name for the materialized view.

Example

Example 1: Alter the name of the materialized view

ALTER MATERIALIZED VIEW lo_mv1 RENAME lo_mv1_new_name;

Example 2: Alter the refresh interval of the materialized view

ALTER MATERIALIZED VIEW lo_mv2 REFRESH ASYNC EVERY(INTERVAL 1 DAY);