Updated on 2026-11-06 GMT+08:00

Drop View

Function

Drop a view.

Syntax

DROP VIEW [IF EXISTS] [db_name.]view_name; 

Keywords

DROP: Drop the metadata of the specified view. Although views and tables share many commonalities, DROP TABLE cannot be used to drop a view.

Precautions

The view to be dropped must already exist. Otherwise, an error will occur. This error can be avoided by using IF EXISTS.

Examples

Drop the view named student_view.

DROP VIEW student_view;