DROP VIEW v17
Name
DROP VIEW
— Remove a view.
Synopsis
Description
DROP VIEW
drops an existing view. To execute this command, you must be a database superuser or the owner of the view. The named view isn't deleted if other objects depend on this view, such as a view of a view.
The form of the DROP VIEW
command compatible with Oracle doesn't support a CASCADE
clause. To drop a view and its dependencies, use the PostgreSQL-compatible form of the DROP VIEW
command. For more information, see the PostgreSQL core documentation.
Parameters
name
The name (optionally schema-qualified) of the view to remove.
Examples
This example removes the view named dept_30
: