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)