Remove an existing view from the database.
The DROP VIEW statement removes an existing view definition from the database. Once dropped, the view can no longer be queried and any queries or other views that depend on it will fail. DROP VIEW does not affect the underlying tables or their data since views are virtual and do not store data. The IF EXISTS clause can be used to prevent an error if the view does not exist. Some databases support DROP VIEW CASCADE to also drop dependent views.
| Name | Description | Optional |
|---|---|---|
view_name |
The name of the view to remove. | No |
DROP VIEW active_users;
DROP VIEW IF EXISTS department_summary;