SelectDB Cloud
SQL 手册
SQL 语句
Show
SHOW-CREATE-MATERIALIZED-VIEW

SHOW-CREATE-MATERIALIZED-VIEW

Name

SHOW CREATE MATERIALIZED VIEW

Description

该语句用于查询创建物化视图的语句。

语法:

SHOW CREATE MATERIALIZED VIEW mv_name ON table_name
  1. mv_name: 物化视图的名称。必填项。

  2. table_name: 物化视图所属的表名。必填项。

Example

创建物化视图的语句为

create materialized view id_col1 as select id,col1 from table3;

查询后返回

mysql> show create materialized view id_col1 on table3;
+-----------+----------+----------------------------------------------------------------+
| TableName | ViewName | CreateStmt                                                     |
+-----------+----------+----------------------------------------------------------------+
| table3    | id_col1  | create materialized view id_col1 as select id,col1 from table3 |
+-----------+----------+----------------------------------------------------------------+
1 row in set (0.00 sec)

Keywords

SHOW, MATERIALIZED, VIEW

Best Practice

© 2023 北京飞轮数据科技有限公司 京ICP备2022004029号 | Apache、Apache Doris 以及相关开源项目名称均为 Apache 基金会商标