Show TOC

Background documentationDROP VIEW Statement (drop_view_statement) Locate this document in the navigation structure

 

The DROP VIEW statement (drop_view_statement) drops a view table.

Structure

Syntax Syntax

  1. <drop_view_statement> ::=
      DROP VIEW <table_name> [<cascade_option>]
End of the code.
Examples

SQL Tutorial, View Tables

Explanation

The table name must identify an existing view table.

The database user must be the owner of the specified view table or have the DROPIN privilege for the schema to which the view table is assigned.

The metadata of the view table and all dependent synonyms, view tables, and privileges are dropped. The tables on which the view table was created remain unaffected.

<cascade_option>

If no CASCADE option is specified, the view table is dropped together with all the view tables, privileges, and synonyms that are dependent on it.

  • If the CASCADE option RESTRICT is specified, and other view tables or synonyms based on this view table exist, the DROP VIEW statement fails.

  • If the CASCADE option CASCADE is specified, the view table is dropped together with all the view tables, privileges, and synonyms that are dependent on it.

More Information

CREATE VIEW Statement