Home  >  Article  >  Database  >  How do we delete a MySQL view from the database?

How do we delete a MySQL view from the database?

王林
王林forward
2023-08-25 22:01:111591browse

我们如何从数据库中删除 MySQL 视图?

With the help of DROP VIEW statement, we can delete the MySQL view from the database. Its syntax is as follows -

Syntax

DROP VIEW [IF EXISTS] view_name;

Here view_name is the name of the view we want to delete from the database.

Example

Suppose we want to delete a view view named info_less then the following query will delete if -

mysql> DROP VIEW IF EXISTS Info_less;
Query OK, 0 rows affected (0.03 sec)

The above is the detailed content of How do we delete a MySQL view from the database?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete