TestingDocs.com
    Software Testing website
    • Automation
      • Selenium
      • JBehave Framework
    • Tutorials
      • MySQL Tutorials
      • Testlink
      • Maven
      • Git
    • IDEs
      • IntelliJ IDEA
      • Eclipse
    • Flowcharts
      • Flowgorithm
      • Raptor
    • About

    MySQL

    MySQL SHOW CREATE VIEW Statement

    Overview

    The SHOW CREATE VIEW statement shows a CREATE VIEW statement that creates the given view. MySQL statements that are designed to display the base table information can also be used to display the view information.

    For example, the following statements also displays the views:

    • DESCRIBE
    • SHOW TABLE STATUS
    • SHOW TABLES

    Syntax

    The general syntax of the statement is as follows::

    SHOW CREATE VIEW <view_name>

    This statement displays the creation of a view from an existing table.

    Example

    The SHOW FULL TABLES lists the names of the tables and the views. The Table_type column displays the values that indicate the kind of object for each object. The column values are BASE TABLE, VIEW, or SYSTEM VIEW.

     

    mysql> SHOW FULL TABLES;
    +———————+————+
    | Tables_in_worlddemo | Table_type |
    +———————+————+
    | city | BASE TABLE |
    | country | BASE TABLE |
    | countrylanguage | BASE TABLE |
    | v_city | VIEW |
    +———————+————+
    4 rows in set (0.00 sec)

     

    mysql> SHOW CREATE VIEW v_city \G

    *************************** 1. row ***************************
    View: v_city
    Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_city` AS select `city`.`ID` AS `id`,`city`.`Name` AS `name`,`city`.`CountryCode` AS `countrycode` from `city`
    character_set_client: cp850
    collation_connection: cp850_general_ci
    1 row in set (0.00 sec)

     

    MySQL SHOW CREATE VIEW

    We can also obtain information about view objects from INFORMATION_SCHEMA. This schema contains a system view called VIEWS.

    —

    MySQL Tutorials

    MySQL Tutorials on this website:

    https://www.testingdocs.com/mysql-tutorials-for-beginners/

    For more information on MySQL Database:

    https://www.mysql.com/

    Related Posts

    Stellar Converter for Database Tool

    MySQL /

    Stellar Converter for Database

    Stellar MySQL Log Analyzer

    MySQL /

    Stellar Log Analyzer for MySQL

    Stellar Repair for MySQL

    MySQL /

    Stellar Repair for MySQL

    MySQL /

    How to secure your SQL Database: Tips and Tricks

    Stellar Converter for Database

    MySQL /

    Database Converter Tools

    ‹ MySQL ADD PRIMARY KEY clause› MySQL INNER JOIN

    Recent Posts

    • Running Tests in Parallel with Selenium Grid
    • Advanced Selenium Features
    • Locating Web Elements
    • Running the Test Script
    • Writing Your First Selenium Test Script
    • Getting Started with Selenium Automation Testing
    • Setting Up the Environment
    • How can you monitor the Quality Assurance Audit?
    • Leveraging LambdaTest with Appium 2.0
    • Appium 2.0 Plugins ListAppium 2.0 Plugins
    • Touch Actions and Multi-Touch Actions
    • Changes in Drivers and Classes
    • Appium Inspector
    • Capabilities in Appium 2.0
    • Appium 2.0 Driver ListAppium 2.0 Driver Installation & Management
    CyberLink Multimedia Software

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com