mysql数据库中查看某个视图的定义的SQL语句

时间:2018-03-08 12:08:42   收藏:0   阅读:4138

环境描述:

  • mysql版本:5.5.57-log
  • 操作系统版本:Red Hat Enterprise Linux Server release 6.6 (Santiago)

需求描述:

  查看某个视图的定义SQL语句

通过information_schema数据库下的views表来进行查询:

SELECT
    table_name,
    table_schema,
    view_definition,
    check_option,
    is_updatable
FROM
    information_schema.views
WHERE
    table_name = v_t\G

查询结果:

技术分享图片

说明:其中view_definition字段就是视图的定义。

 

文档创建时间:2018年3月8日10:57:18

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!