Query and delete mysql views

Source: Internet
Author: User

This tutorial describes how to query and delete the mysql view. You can use the show view name to query the view and delete the mysql view with the drop permission. However, you must have the drop permission to delete the view. Next let's take a look at the view.

This tutorial introducesMysql tutorial View queryAnd delete. Use the show view name to query the view,Delete mysql ViewIt is easy to use drop, but you must have the drop permission to delete a view. Next let's take a look at the view.

View the view Syntax "show tables;" or "show tables status". You can not only view the view name in the table, but also view other related information, such as an instance.

-> Show tables;

St

Stff

Staroo

26 row in set (0.00 sec );

-> Show tables status like 'st' G

Name: st

Engine: NULL

Version: NUll

.....

.

To queryViewCan be viewed using the show create view command.

-> Show create view st list G

View: st

Create View: create algorithm = udefined definer = 'root @ localhost' SQL ....

And so on. If you do not write anything else, you can test it in mysql.

Now let's take a look.Mysql Delete ViewInstance

Syntax:

Drop view [if exists] view_name [, viewname]... [restrict | casede]

For example, to delete the st View

-> Drop view st;

Query OK, 0 rows affected (0.00 sec );

This site Original article reprinted Indicate source http://www.bKjia. c0m/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.