DROP VIEW statement

Drops the specified view.

Syntax

DROP VIEW viewName

Example

DROP VIEW AnIdentifier

Statement dependency system

Any statements referencing the view are invalidated on a DROP VIEW statement. DROP VIEW is disallowed if there are any views or open cursors dependent on the view.

Normally, you must drop a view before you drop any objects that the view depends on. However, if you issue an ALTER TABLE DROP COLUMN command with the CASCADE option, any views that depend on the column will be dropped. Also, if you use a REVOKE statement to revoke privileges on objects that a view depends on, the view will be dropped. Similarly, if you use a DROP ROLE statement to drop a role that has privileges on objects that a view depends on, the view will be dropped.

Related reference
DROP DERBY AGGREGATE statement
DROP FUNCTION statement
DROP INDEX statement
DROP PROCEDURE statement
DROP ROLE statement
DROP SCHEMA statement
DROP SEQUENCE statement
DROP SYNONYM statement
DROP TABLE statement
DROP TRIGGER statement
DROP TYPE statement