docs/sql-reference/statements/drop-view.mdx
Remove a view definition from the database. The underlying tables and their data are not affected.
DROP VIEW [IF EXISTS] [schema-name.]view-name;
DROP VIEW removes a previously created view. After the view is dropped, queries referencing the view name produce an error. The tables referenced by the view are unaffected.
| Parameter | Description |
|---|---|
IF EXISTS | Prevents an error if the view does not exist. The statement is a no-op when the view is absent. |
schema-name | The name of the attached database containing the view. Defaults to the main database if omitted. |
view-name | The name of the view to drop. |
DROP VIEW active_users;
DROP VIEW IF EXISTS old_report;
DROP VIEW aux.cached_stats;