DROP VIEW

更新时间:
复制 MD 格式

Drops an existing view.

Syntax

drop view [if exists] <view_name>;

Parameters

  • if exists: optional. If you do not specify the if exists parameter and the view that you want to drop does not exist, an error is returned.
  • view_name: required. The name of the view that you want to drop.

Examples

-- Drop the sale_detail_view view. 
drop view if exists sale_detail_view;

Related statements

  • CREATE VIEW: Creates a view or updates an existing view based on a query statement.
  • ALTER VIEW: Changes the name or owner of an existing view.
  • DESC VIEW: Views information of an existing view.