Removes a view from a PolarDB-X instance. Dropping a view does not affect the underlying tables.
Syntax
DROP VIEW [IF EXISTS] view_nameParameters
| Parameter | Description |
|---|---|
IF EXISTS | Optional. Suppresses an error if the view does not exist. Without this clause, dropping a non-existent view returns an error. |
view_name | The 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
该文章对您有帮助吗?