SHOW-CREATE-MATERIALIZED-VIEW

Name

SHOW CREATE MATERIALIZED VIEW

Description

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

语法:

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

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

Example

创建物化视图的语句为

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

查询后返回

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

Keywords

  1. SHOW, MATERIALIZED, VIEW

Best Practice