Dropping Views

From InterBase
Jump to: navigation, search

Go Up to Working with Views


The DROP VIEW statement enables a view’s creator to remove a view definition from the database. It does not affect the base tables associated with the view. You can drop a view only if:

  • You created the view.
  • The view is not used in another view, a stored procedure, or CHECK constraint definition. You must delete the associated database objects before dropping the view.

The syntax for DROP VIEW is:

DROP VIEW name;

The following statement removes a view definition:

DROP VIEW SUB_DEPT;
Note: You cannot alter a view directly. To change a view, drop it and use the CREATE VIEW statement to create a view with the same name and the features you want.

Advance To: