DROP VIEW Statement

Removes a view from a database.

Syntax

DROP VIEW [owner.]view_name [, [owner.]view_name...]

where

view_name
Specifies the view(s) to be removed.

Remarks

When you use DROP VIEW, the definition of the view and other information about it are deleted from the sysobjects, syscolumns, syscomments, sysdepends, sysprocedures, and sysprotects system tables. All privileges for the view are also deleted.

To see a list of view names, use the sp_help system stored procedure.

Permission

DROP VIEW permission defaults to the view owner and is not transferable. However, the system administrator and database owner can drop any object by explicitly specifying the owner in the DROP VIEW statement.

Example

This example removes the titles_view view.

DROP VIEW titles_view

See Also

CREATE VIEW sp_help
sp_depends sp_helptext