
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can we drop a MySQL view from the database?
With the help of DROP VIEW statement, we can drop a MySQL view from the database. Its syntax would be as follows −
Syntax
DROP VIEW [IF EXISTS] view_name;
Here view_name is the name of the view which we want to delete from the database.
Example
Suppose if we want to drop a 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)
- Related Questions & Answers
- How can we drop UNIQUE constraint from a MySQL table?
- How can we drop a MySQL stored procedure?
- How can we delete a MySQL stored function from the database?
- How can we see the metadata of a view(s) stored in a particular MySQL database?
- How can we drop an existing database by using mysqladmin?
- How can we create a MySQL view based on another existing view?
- How can we create a MySQL view with a subquery?
- How can we create a MySQL view by using data from multiple tables?
- How can we create a table from an existing MySQL table in the database?
- How can we change the default MySQL database to the given database?
- How can we get the structure of a MySQL view as we can get the structure of a MySQL table?
- How can we get the definition of a MySQL view as we can get the definition of a MySQL table?
- How can we modify a MySQL view with CREATE OR REPLACE VIEW statement?
- How can we create a MySQL view with LEFT JOIN?
- How can we create a MySQL view with INNER JOIN?
Advertisements