SQL statement to view the definition of a view in the MySQL database

Source: Internet
Author: User
Tags mysql version

Environment Description:

    • MySQL version: 5.5.57-log
    • Operating system version: Red Hat Enterprise Linux Server Release 6.6 (Santiago)

Requirements Description:

To view a defined SQL statement for a view

Query through the Views table under the INFORMATION_SCHEMA database:

SELECT     table_name,    table_schema,    view_definition,    check_option,    is_updatablefrom      information_schema.viewsWHERE='    v_t  '\g

Query Result:

Description: Where the view_definition field is the definition of the view.

Document creation Time: March 8, 2018 10:57:18

SQL statement to view the definition of a view in the MySQL database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.