DROP VIEW

Removes the specified view from the current/specified schema.

See also:

CREATE VIEW , ALTER VIEW , SHOW VIEWS , DESCRIBE VIEW

Syntax

DROP VIEW [ IF EXISTS ] <name>
Copy

Parameters

name

Specifies the identifier for the view to drop. If the identifier contains spaces, special characters, or mixed-case characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

If the view identifier is not fully-qualified (in the form of db_name.schema_name.table_name or schema_name.table_name), the command looks for the view in the current schema for the session.

Usage notes

  • Dropped views cannot be recovered; they must be recreated.

Examples

DROP VIEW myview;
Copy
------------------------------+
           status             |
------------------------------+
 MYVIEW successfully dropped. |
------------------------------+
Language: English