Deletes a view.

Syntax

DROP VIEW name

Description

You can use the DROP VIEW command to drop an existing view. To run this command on a view, you must be a superuser or the owner of the view. If the specified view has dependent objects, such as a view of the view, the specified view is not deleted.

The form of the DROP VIEW command that is compatible with Oracle does not support the CASCADE clause. To drop a view and its dependencies, use the PostgreSQL-compatible form of the DROP VIEW command. For more information, visit the PostgreSQL documentation DROP VIEW.

Parameters

Parameter Description
name The name of the view to be deleted. The name can be schema-qualified.

Examples

Delete the dept_30 view:

DROP VIEW dept_30;