• mysql中查看视图的元数据?


    需求描述:

      查看视图的元数据的方法.

    操作过程:

    1.通过查看information_schema数据库下的views表来查看视图的定义语句

    mysql> select definer,view_definition from information_schema.views where table_schema = 'test' and table_name = 'v01'G
    *************************** 1. row ***************************
            definer: root@localhost
    view_definition: select `vw_01`.`a` AS `a`,`vw_01`.`b` AS `b` from `test`.`vw_01`
    1 row in set (0.00 sec)

    2.通过show create view语句来查看视图的元数据

    mysql> show create view v01G
    *************************** 1. row ***************************
                    View: v01
             Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v01` AS select `vw_01`.`a` AS `a`,`vw_01`.`b` AS `b` from `vw_01`
    character_set_client: utf8
    collation_connection: utf8_general_ci
    1 row in set (0.00 sec)

    文档创建时间:2018年6月26日17:37:19

  • 相关阅读:
    java异常处理 it
    java文件操作 it
    ArrayLike it
    javaProreties it
    javaset,Collections,map it
    003 Longest Substring Without Repeating Characters it
    react Video event it
    查看git地址
    Itext 生成PDF
    jar包配置文件到单独文件夹
  • 原文地址:https://www.cnblogs.com/chuanzhang053/p/9230320.html
Copyright © 2020-2023  润新知