Skip to main content

SHOW CREATE MATERIALIZED VIEW

使用 SHOW CREATE MATERIALIZED VIEW 命令查看用于创建指定物化视图的语句。

句法

SHOW CREATE MATERIALIZED VIEW mv_name;

参数

参数描述
mv_name要显示其语句的物化视图。

示例

CREATE MATERIALIZED VIEW v1 AS SELECT id FROM taxi_trips;
SHOW CREATE MATERIALIZED VIEW v1;

结果如下。

   Name    |                 Create Sql                  
-----------+---------------------------------------------
public.v1 | CREATE MATERIALIZED VIEW v1 AS SELECT id FROM taxi_trips
(1 row)

相关内容

SHOW CREATE VIEW

SHOW CREATE TABLE