SQL DROP VIEW Statement

The DROP VIEW statement in SQL is used to delete a view from a database. A view, remember, is a stored query that acts like a virtual table—it doesn't store data itself, but provides a customized way to access data from underlying tables.



DROP VIEW: Definition and Usage

Removing a view doesn't affect the underlying tables the view was based on. It simply deletes the view's definition, meaning you can no longer use that specific view to access data. This is a quick and simple way to remove a view if it's no longer needed.

Syntax

Syntax

DROP VIEW view_name;
      

Example

Dropping a View

This example demonstrates how to drop a view named 'Brazil Customers'.

Syntax

DROP VIEW [Brazil Customers];
      
Output

The view named 'Brazil Customers' is deleted. The underlying data is unaffected.