DROP VIEW

Updated at:

Deletes a view from a PolarDB-X 1.0 instance.

Prerequisites

Before you begin, ensure that you have:

  • A PolarDB-X 1.0 instance running version 5.4.5 or later

Syntax

DROP VIEW [IF EXISTS] view_name

Examples

Create a view, then delete it:

-- Create a view
CREATE VIEW v AS SELECT 1;

-- Delete the view
DROP VIEW v;

To avoid an error if the view may not exist:

DROP VIEW IF EXISTS v;