This page in other versions: 9.0 / 9.1 / 9.2 / 9.3  |  Development versions: devel / 9.4  |  Unsupported versions: 7.1 / 7.2 / 7.3 / 7.4 / 8.0 / 8.1 / 8.2 / 8.3 / 8.4

DROP VIEW

Name

DROP VIEW  --  remove a view

Synopsis

DROP VIEW name [, ...] [ CASCADE | RESTRICT ]
  

Inputs

name

The name (optionally schema-qualified) of an existing view.

CASCADE

Automatically drop objects that depend on the view (such as other views).

RESTRICT

Refuse to drop the view if there are any dependent objects. This is the default.

Outputs

DROP VIEW

The message returned if the command is successful.

ERROR: view name does not exist

This message occurs if the specified view does not exist in the database.

Description

DROP VIEW drops an existing view from the database. To execute this command you must be the owner of the view.

Notes

Refer to CREATE VIEW for information on how to create views.

Usage

This command will remove the view called kinds:

DROP VIEW kinds;
  

Compatibility

SQL92

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group