Updated on 2024-12-13 GMT+08:00

SHOW CREATE MATERIALIZED VIEW

Syntax

SHOW CREATE MATERIALIZED VIEW materialized_view_name

Description

This statement is used to display the SQL statements that can be used to create a materialized view.

Example

Displays the SQL statements for creating the materialized view.

hetuengine:tpcds_2gb> show create materialized view mv.tpcds.test;
             Create Materialized View
---------------------------------------------------
 CREATE MATERIALIZED VIEW mv.tpcds.test ( c1, id )
 WITH (
    storage_table = 'mppdb.tpcds.test'
 ) AS
 SELECT
   c1
 , id
 FROM
   t1
WHERE (id < 7)