DROP VIEW
Use the DROP VIEW
command to remove an existing view from a particular schema.
Syntax
DROP VIEW [IF EXISTS] view_name;
Parameters
Parameter | Description |
---|---|
IF EXISTS clause | Do not return an error if the specified view does not exist. |
view_name | Name of the view to be dropped. |
Example
This statement removes the sales_report
view if it exists.
DROP VIEW IF EXISTS sales_report;
Related topics
CREATE VIEW
— Create a non-materialized view.SHOW CREATE VIEW
— Show query used to create specified view.SHOW VIEWS
— List existing views in a particular schema.