DROP VIEW

更新时间: 2026-03-28 01:12:05

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

上一篇: CREATE VIEW 下一篇: Use the LOCALITY attribute to specify data nodes
阿里云首页 云原生数据库 PolarDB 相关技术圈