SQL DROP VIEW is a Data Definition Language (DDL) command that permanently deletes a view definition from the system catalog. After execution, the view can no longer be queried, granted permissions, or referenced by other database objects. Most dialects let you add IF EXISTS to avoid errors when the target view is missing, and CASCADE or RESTRICT to control what happens if other objects depend on the view. Dropping a view does not affect the underlying base tables; only the stored SELECT statement and its metadata are removed.
view_name
(identifier) - Name of the view to drop.IF EXISTS
(keyword) - Suppress error if the view does not exist.CASCADE
(keyword) - Automatically drop dependent objects (other views, grants, etc.).RESTRICT
(keyword) - Refuse to drop if dependent objects exist (default in many systems).CREATE VIEW, ALTER VIEW, DROP TABLE, DROP MATERIALIZED VIEW, CREATE OR REPLACE VIEW
SQL-92
Add IF EXISTS to avoid an error. The database returns a notice and continues executing the batch.
List them comma-separated in a single DROP VIEW statement: `DROP VIEW v1, v2, v3;`.
Not after the transaction commits. You must recreate the view or restore from backup.
No. The command deletes only the view definition; base tables and their data remain intact.