MySQL View query and delete

Source: Internet
Author: User

This tutorial to talk about the MySQL Tutorial view query and delete Oh, query view with the show view name, delete the MySQL view with drop is also very simple, but delete the view to have drop permission to do. Now let's look at the view

View the view syntax show tables; Or Show tables status the latter can not only find out the view name of the table, but also can view other relevant information, such as instance

->show tables;

St

Stff

Staroo

Row in Set (0.00 sec);

->show tables status like ' st ' G

Name:st

Engine:null

Version:null

.....

and other related information.

If you need to query the definition of a view , you can use the show create VIEW command to view

->show CREATE VIEW St list G

View:st

Create view:create algorithm = udefined definer = ' root@localhost ' sql ....

And so on, others do not write, their own in the MySQL test can be seen.

Okay, now let's look at MySQL. Delete View instance

Grammar:

Drop View [if exists] view_name [, viewname] ... [Restrict |casede]

For example, to remove the St view

->drop View St;

Query Ok, 0 rows Affected (0.00 sec);

Original articles reproduced in this site annotated source http://www.111cn.net/database/database.html

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.