DROP VIEW

Delete the view.

Summary

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

describe

DROP VIEW will delete the existing view. Only view owners can delete it.

Parameters

IF EXISTS

  • If the view does not exist, please do not report an error. In this case, a notification will be issued.

name

  • The name of the view to be deleted (can be specified by the pattern).

CASCADE

  • Automatically delete views-dependent objects (such as other views).

RESTRICT

  • If any object depends on the view, the view is denied. This is the default value.

Example

Delete the view topten:

DROP VIEW topten;

compatibility

DROP VIEW is fully SQL-compliant, but this standard allows only one view per command to be deleted. Additionally, the IF EXISTS option is a YMatrix database extension.

See also

ALTER VIEW , CREATE VIEW