MSDN Documentation

DROP VIEW

Overview

The DROP VIEW statement removes an existing view from the database. Once a view is dropped, it can no longer be referenced in queries unless it is recreated.

Syntax

DROP VIEW [IF EXISTS] schema_name.view_name;

Parameters

Example

Suppose you have a view named EmployeeSummary in the dbo schema.

-- Drop the view if it exists
DROP VIEW IF EXISTS dbo.EmployeeSummary;

What Happens After DROP?

The view definition is removed, but the underlying tables remain unchanged. Any dependent objects (e.g., stored procedures) that reference the view will become invalid until they are altered or the view is recreated.

Related Topics