DROP VIEW

更新时间:
复制 MD 格式

Removes a view from a PolarDB-X instance. Dropping a view does not affect the underlying tables.

Syntax

DROP VIEW [IF EXISTS] view_name

Parameters

ParameterDescription
IF EXISTSOptional. Suppresses an error if the view does not exist. Without this clause, dropping a non-existent view returns an error.
view_nameThe name of the view to drop.

Example

The following example creates a view and then drops it. The underlying table data is not affected.

-- Create a view.
create view v as select 1;
-- Drop the view.
drop view v;

What's next