DROP VIEW

Use the DROP VIEW command to remove a view from the current database.

Syntax

Syntax dropping a view:
DROP VIEW <name>[,<name>…]

Input

The DROP VIEW command takes the following input:
Table 1. DROP VIEW input
Input Description
<name> The name of the view to be dropped.

Outputs

The DROP VIEW command has the following outputs:
Table 2. DROP VIEW outputs
Output Description
DROP VIEW The command was successful.
ERROR: Name: No such view The specified view does not exist in the current database.

Privileges

You must be the admin user, the view owner, the owner of the database or schema where the view is defined, or your account must have Drop privilege for theview or for the View object class.

Usage

The following provides sample usage.
  • Remove the view kinds:
    MYDB.SCH1(USER)=> DROP VIEW kinds;