informix
Informix Guide to SQL: Syntax
SQL Statements

DROP VIEW

Use the DROP VIEW statement to remove a view from a database.

Syntax

Element Purpose Restrictions Syntax
synonym Name of the synonym to drop The synonym and the view to which the synonym points must exist. Database Object Name, p. 4-50
view Name of the view to drop The view must exist.
Database Object Name, p. 4-50

Usage

You must be the owner of the view or have the DBA privilege to drop the view.

When you drop a view or its synonym, you also drop all views that were defined in terms of that view. You can also specify this default condition with the CASCADE keyword.

When you use the RESTRICT keyword in the DROP VIEW statement, the drop operation fails if any existing views are defined on view, which would be abandoned in the drop operation.

You can query the sysdepend system catalog table to determine which views, if any, depend on another view.

The following statement drops the view that is named cust1:

Related Information

Related statements: CREATE VIEW and DROP TABLE

For a discussion of views, see the Informix Guide to SQL: Tutorial.


Informix Guide to SQL: Syntax, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved