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

MySQL Workbench Windows 11

MySQL /

New MySQL Connection in Workbench

MySQL Command-line Client

MySQL /

Command-Line MySQL Client

Start MySQL Client

MySQL /

Start MySQL Client on Windows 11

Windows 11 Services Run Prompt

MySQL /

Start MySQL Server on Windows 11

MySQL Community Downloads TDocs

MySQL /

Download & Install MySQL on Windows 11

‹ MySQL ADD PRIMARY KEY clause› MySQL INNER JOIN

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle
  • Draw Parallel Lines using Flowgorithm Graphics

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version