MySQL

How to Delete a View in MySQL

In this tutorial, we are going to see how to delete a view in MySQL. In MySQL, a view is not a physical table, but rather a virtual table created by a query joining one or more tables. Once a view has been created in MySQL, you can drop it with the statement DROP VIEW.
 

Syntax:

The syntax of the statement DROP VIEW in MySQL is as follows:

DROP VIEW [IF EXISTS] viewName;
 

Example: How to Delete a View in MySQL

Here is an example of using the statement DROP VIEW in MySQL:

DROP VIEW stock_vw;

In this example, the statement DROP VIEW drops the MySQL view called “stock_vw”.
mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *